本文整理汇总了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()