本文整理汇总了Python中django.test.LiveServerTestCase.tearDownClass方法的典型用法代码示例。如果您正苦于以下问题:Python LiveServerTestCase.tearDownClass方法的具体用法?Python LiveServerTestCase.tearDownClass怎么用?Python LiveServerTestCase.tearDownClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类django.test.LiveServerTestCase
的用法示例。
在下文中一共展示了LiveServerTestCase.tearDownClass方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDownClass
# 需要导入模块: from django.test import LiveServerTestCase [as 别名]
# 或者: from django.test.LiveServerTestCase import tearDownClass [as 别名]
def tearDownClass(cls):
if cls.server_url == cls.live_server_url:
LiveServerTestCase.tearDownClass()
示例2: tearDownClass
# 需要导入模块: from django.test import LiveServerTestCase [as 别名]
# 或者: from django.test.LiveServerTestCase import tearDownClass [as 别名]
def tearDownClass(cls):
cls.browser.quit()
if cls.display:
cls.display.stop()
if cls.server_url == cls.live_server_url:
LiveServerTestCase.tearDownClass()
示例3: tearDownClass
# 需要导入模块: from django.test import LiveServerTestCase [as 别名]
# 或者: from django.test.LiveServerTestCase import tearDownClass [as 别名]
def tearDownClass(cls):
"""docstring for tearDownClass"""
if cls.server_url == cls.live_server_url:
LiveServerTestCase.tearDownClass()
示例4: tearDownClass
# 需要导入模块: from django.test import LiveServerTestCase [as 别名]
# 或者: from django.test.LiveServerTestCase import tearDownClass [as 别名]
def tearDownClass(cls):
#if cls.server_url == cls.live_server_url:
if cls.server_url == "http://127.0.0.1:8081/":
LiveServerTestCase.tearDownClass()
示例5: stop_liveserver_if_needed
# 需要导入模块: from django.test import LiveServerTestCase [as 别名]
# 或者: from django.test.LiveServerTestCase import tearDownClass [as 别名]
def stop_liveserver_if_needed(cls):
if cls.has_liveserver:
LiveServerTestCase.tearDownClass()
cls.selenium.quit()
示例6: tearDownClass
# 需要导入模块: from django.test import LiveServerTestCase [as 别名]
# 或者: from django.test.LiveServerTestCase import tearDownClass [as 别名]
def tearDownClass(cls):
if not cls.against_staging:
LiveServerTestCase.tearDownClass()
示例7: tearDownClass
# 需要导入模块: from django.test import LiveServerTestCase [as 别名]
# 或者: from django.test.LiveServerTestCase import tearDownClass [as 别名]
def tearDownClass(cls):
""" Cleanup global test/live test environment """
if cls.server_url == cls.live_server_url:
LiveServerTestCase.tearDownClass()