当前位置: 首页>>代码示例>>Python>>正文


Python TestCase.tearDown方法代码示例

本文整理汇总了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)
开发者ID:alexhayes,项目名称:django-async-test,代码行数:18,代码来源:testcase.py

示例2: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     TestCaseMixin.tearDown(self)
     TestCase.tearDown(self)
开发者ID:ajaniv,项目名称:django-core-utils,代码行数:5,代码来源:test_utils.py

示例3: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     TestCase.tearDown(self)
     self.sequenceListing.delete()
开发者ID:sadrians,项目名称:st26proto,代码行数:5,代码来源:tests.py

示例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)
开发者ID:anhpt204,项目名称:tracnghiem_nham,代码行数:5,代码来源:test.py

示例5: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.__clean_data()
     TestCase.tearDown(self)
开发者ID:kal,项目名称:pireader,代码行数:5,代码来源:tests.py

示例6: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     reload(configureproject)
     TestCase.tearDown(self)
开发者ID:Fiware,项目名称:apps.Wstore,代码行数:5,代码来源:tests.py

示例7: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     TestCase.tearDown(self)
     self.user.delete()
开发者ID:kevinpamplona,项目名称:pdm,代码行数:5,代码来源:tests.py

示例8: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     reload(offerings_management)
     TestCase.tearDown(self)
开发者ID:Fiware,项目名称:apps.Wstore,代码行数:5,代码来源:offering_tests.py

示例9: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     reload(recommendation_manager)
     TestCase.tearDown(self)
开发者ID:Fiware,项目名称:apps.Wstore,代码行数:5,代码来源:tests.py

示例10: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     TestCase.tearDown(self)
     AsyncHTTPTestCase.tearDown(self)
开发者ID:MechanisM,项目名称:django-signalqueue,代码行数:5,代码来源:tests.py

示例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
开发者ID:wcirillo,项目名称:ten,代码行数:6,代码来源:geolocation_test_case.py

示例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)
开发者ID:MidAtlanticPortal,项目名称:marco-map_groups,代码行数:7,代码来源:tests.py

示例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()
开发者ID:blancltd,项目名称:django-g11n,代码行数:5,代码来源:test_004_command_update_language_countries.py

示例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)
开发者ID:AthinaB,项目名称:synnefo,代码行数:7,代码来源:tests.py

示例15: tearDown

# 需要导入模块: from django.test import TestCase [as 别名]
# 或者: from django.test.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.driver.quit()
     TestCase.tearDown(self)
开发者ID:gberryproject,项目名称:wstore,代码行数:5,代码来源:testcase.py


注:本文中的django.test.TestCase.tearDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。