diff options
| author | Tim Graham <timograham@gmail.com> | 2012-10-04 06:45:22 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2012-10-04 07:46:53 -0400 |
| commit | a35d7fd1e1c8e2a1e95b6d16949f9fb3977f15cb (patch) | |
| tree | 8e9bfc6e54f8da99cd8940cc0321a8d03bafe074 | |
| parent | 8868a067e02b4fe9f1c669f06e90fc28171b9758 (diff) | |
[1.4.X] Fixed #19051 - Fixed Selenium tearDownClass method; thanks glarrain for the report.
Backport of a1a5c0854f from master
| -rw-r--r-- | django/contrib/admin/tests.py | 4 | ||||
| -rw-r--r-- | docs/topics/testing.txt | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py index 2491fc65b1..9d94127b34 100644 --- a/django/contrib/admin/tests.py +++ b/django/contrib/admin/tests.py @@ -25,9 +25,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): """ @@ -102,4 +102,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 ad4ef50550..53df1f54c5 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -1922,8 +1922,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/')) |
