summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-10-04 06:45:22 -0400
committerTim Graham <timograham@gmail.com>2012-10-04 06:45:22 -0400
commita1a5c0854f0b0d3c94a772c8b994ee2d1d2f9be1 (patch)
tree078d74f452f60d42676a4d19ff92ffc858b584e0
parent725128289398ba4bce60a4093d9d69bbcea01d92 (diff)
Fixed #19051 - Fixed Selenium tearDownClass method; thanks glarrain for the report.
-rw-r--r--django/contrib/admin/tests.py4
-rw-r--r--docs/topics/testing.txt2
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py
index eaf1c8600c..7c62c1a22f 100644
--- a/django/contrib/admin/tests.py
+++ b/django/contrib/admin/tests.py
@@ -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)
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index 2bc8410745..3950e1c917 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -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/'))