本文整理汇总了Python中django.test.TestCase.tearDown方法的典型用法代码示例。如果您正苦于以下问题:Python TestCase.tearDown方法的具体用法?Python TestCase.tearDown怎么用?Python TestCase.tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类django.test.TestCase
的用法示例。
在下文中一共展示了TestCase.tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
"""
Override tearDown method.
Note that ``asynctest`` supports ``tearDown`` as a coroutine however
:py:class:`django_async_test.TestCase` instead supports a
`tearDownAsync`` method.
"""
tearDownAsync = getattr(self, 'tearDownAsync', None)
if tearDownAsync is not None:
if asyncio.iscoroutinefunction(tearDownAsync):
self.loop.run_until_complete(tearDownAsync())
else:
tearDownAsync()
DjangoTestCase.tearDown(self)
示例2: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
TestCaseMixin.tearDown(self)
TestCase.tearDown(self)
示例3: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
TestCase.tearDown(self)
self.sequenceListing.delete()
示例4: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
TestCase.tearDown(self)
fourstore_kill(self.kbname, self.port)
示例5: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
self.__clean_data()
TestCase.tearDown(self)
示例6: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
reload(configureproject)
TestCase.tearDown(self)
示例7: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
TestCase.tearDown(self)
self.user.delete()
示例8: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
reload(offerings_management)
TestCase.tearDown(self)
示例9: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
reload(recommendation_manager)
TestCase.tearDown(self)
示例10: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
TestCase.tearDown(self)
AsyncHTTPTestCase.tearDown(self)
示例11: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
""" Reset TEST_MODE to original. """
TestCase.tearDown(self)
settings.CELERY_ALWAYS_EAGER = self.original_celery_always_eager
示例12: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
for user in self.users.values():
user.delete()
TestCase.tearDown(self)
示例13: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
TestCase.tearDown(self)
self.mock.remove_mock()
示例14: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
"""Kill processes"""
TestCase.tearDown(self)
self.selenium.stop()
self.assertEqual([], self.verificationErrors)
示例15: tearDown
# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
def tearDown(self):
self.driver.quit()
TestCase.tearDown(self)