本文整理匯總了Python中social.tests.models.User.reset_cache方法的典型用法代碼示例。如果您正苦於以下問題:Python User.reset_cache方法的具體用法?Python User.reset_cache怎麽用?Python User.reset_cache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類social.tests.models.User
的用法示例。
在下文中一共展示了User.reset_cache方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: tearDown
# 需要導入模塊: from social.tests.models import User [as 別名]
# 或者: from social.tests.models.User import reset_cache [as 別名]
def tearDown(self):
self.strategy = None
User.reset_cache()
TestUserSocialAuth.reset_cache()
TestNonce.reset_cache()
TestAssociation.reset_cache()
HTTPretty.disable()
示例2: setUp
# 需要導入模塊: from social.tests.models import User [as 別名]
# 或者: from social.tests.models.User import reset_cache [as 別名]
def setUp(self):
HTTPretty.enable()
User.reset_cache()
TestUserSocialAuth.reset_cache()
TestNonce.reset_cache()
TestAssociation.reset_cache()
self.backend = module_member('social.backends.github.GithubOAuth2')
self.strategy = TestStrategy(self.backend, TestStorage)
self.user = None
示例3: tearDown
# 需要導入模塊: from social.tests.models import User [as 別名]
# 或者: from social.tests.models.User import reset_cache [as 別名]
def tearDown(self):
self.backend = None
self.strategy = None
self.user = None
User.reset_cache()
User.set_active(True)
TestUserSocialAuth.reset_cache()
TestNonce.reset_cache()
TestAssociation.reset_cache()
HTTPretty.disable()
示例4: setUp
# 需要導入模塊: from social.tests.models import User [as 別名]
# 或者: from social.tests.models.User import reset_cache [as 別名]
def setUp(self):
HTTPretty.enable()
User.reset_cache()
TestUserSocialAuth.reset_cache()
TestNonce.reset_cache()
TestAssociation.reset_cache()
Backend = module_member("social.backends.github.GithubOAuth2")
self.strategy = self.strategy or TestStrategy(TestStorage)
self.backend = Backend(self.strategy, redirect_uri="/complete/github")
self.user = None
示例5: tearDown
# 需要導入模塊: from social.tests.models import User [as 別名]
# 或者: from social.tests.models.User import reset_cache [as 別名]
def tearDown(self):
HTTPretty.disable()
self.backend = None
self.strategy = None
self.name = None
self.complete_url = None
User.reset_cache()
TestUserSocialAuth.reset_cache()
TestNonce.reset_cache()
TestAssociation.reset_cache()
TestCode.reset_cache()
示例6: setUp
# 需要導入模塊: from social.tests.models import User [as 別名]
# 或者: from social.tests.models.User import reset_cache [as 別名]
def setUp(self):
HTTPretty.enable()
self.backend = module_member(self.backend_path)
self.strategy = TestStrategy(self.backend, TestStorage)
self.name = self.backend.name.upper().replace("-", "_")
self.complete_url = self.strategy.build_absolute_uri(self.raw_complete_url.format(self.backend.name))
backends = (self.backend_path, "social.tests.backends.test_broken.BrokenBackendAuth")
self.strategy.set_settings({"SOCIAL_AUTH_AUTHENTICATION_BACKENDS": backends})
self.strategy.set_settings(self.extra_settings())
# Force backends loading to trash PSA cache
load_backends(backends, force_load=True)
User.reset_cache()
TestUserSocialAuth.reset_cache()
TestNonce.reset_cache()
TestAssociation.reset_cache()
TestCode.reset_cache()