From 08c9ab5a0f564a3ac7803e6a97fae855f2e0524e Mon Sep 17 00:00:00 2001 From: Kevin Christopher Henry Date: Thu, 24 Oct 2013 15:01:25 -0400 Subject: [PATCH] Fixed #21227 -- Added workaround for selenium test failures Added a refresh() before quit() in the selenium tests, since this solves the problem of spurious test failures in some environments. --- django/contrib/admin/tests.py | 1 + tests/view_tests/tests/test_i18n.py | 1 + 2 files changed, 2 insertions(+) diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py index 6e11963a94..248a5798dd 100644 --- a/django/contrib/admin/tests.py +++ b/django/contrib/admin/tests.py @@ -32,6 +32,7 @@ class AdminSeleniumWebDriverTestCase(StaticLiveServerCase): @classmethod def _tearDownClassInternal(cls): if hasattr(cls, 'selenium'): + cls.selenium.refresh() # see ticket #21227 cls.selenium.quit() super(AdminSeleniumWebDriverTestCase, cls)._tearDownClassInternal() diff --git a/tests/view_tests/tests/test_i18n.py b/tests/view_tests/tests/test_i18n.py index 777fc24bb1..42f82251f5 100644 --- a/tests/view_tests/tests/test_i18n.py +++ b/tests/view_tests/tests/test_i18n.py @@ -189,6 +189,7 @@ class JavascriptI18nTests(LiveServerTestCase): @classmethod def tearDownClass(cls): + cls.selenium.refresh() # see ticket #21227 cls.selenium.quit() super(JavascriptI18nTests, cls).tearDownClass()