Kaydet (Commit) a1a5c085 authored tarafından Tim Graham's avatar Tim Graham

Fixed #19051 - Fixed Selenium tearDownClass method; thanks glarrain for the report.

üst 72512828
......@@ -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)
\ No newline at end of file
.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/'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment