mirror of https://github.com/django/django.git
Fixed #19051 - Fixed Selenium tearDownClass method; thanks glarrain for the report.
This commit is contained in:
parent
7251282893
commit
a1a5c0854f
|
@ -21,9 +21,9 @@ class AdminSeleniumWebDriverTestCase(LiveServerTestCase):
|
|||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(AdminSeleniumWebDriverTestCase, cls).tearDownClass()
|
||||
if hasattr(cls, 'selenium'):
|
||||
cls.selenium.quit()
|
||||
super(AdminSeleniumWebDriverTestCase, cls).tearDownClass()
|
||||
|
||||
def wait_until(self, callback, timeout=10):
|
||||
"""
|
||||
|
@ -98,4 +98,4 @@ class AdminSeleniumWebDriverTestCase(LiveServerTestCase):
|
|||
`klass`.
|
||||
"""
|
||||
return (self.selenium.find_element_by_css_selector(selector)
|
||||
.get_attribute('class').find(klass) != -1)
|
||||
.get_attribute('class').find(klass) != -1)
|
||||
|
|
|
@ -1973,8 +1973,8 @@ Then, add a ``LiveServerTestCase``-based test to your app's tests module
|
|||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(MySeleniumTests, cls).tearDownClass()
|
||||
cls.selenium.quit()
|
||||
super(MySeleniumTests, cls).tearDownClass()
|
||||
|
||||
def test_login(self):
|
||||
self.selenium.get('%s%s' % (self.live_server_url, '/login/'))
|
||||
|
|
Loading…
Reference in New Issue