summaryrefslogtreecommitdiff
path: root/tests/admin_widgets/tests.py
diff options
context:
space:
mode:
authorDavid Sanders <dsanders11@ucsbalum.com>2016-05-13 11:36:41 +0000
committerTim Graham <timograham@gmail.com>2016-05-13 09:06:20 -0400
commit14c952d58167a66645b5e56f7a0ffb6b3bcfbbde (patch)
treebca8815094d4bad42e688c7ce3eba032ade64a80 /tests/admin_widgets/tests.py
parent996cadfa5fbf96062037d1834cc8584fddf655ad (diff)
downloaddjango-14c952d58167a66645b5e56f7a0ffb6b3bcfbbde.tar.gz
Fixed #26612 -- Fixed SelectFilter2 buttons changing URL.
Diffstat (limited to 'tests/admin_widgets/tests.py')
-rw-r--r--tests/admin_widgets/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
index 42822006e6..a1006af7c7 100644
--- a/tests/admin_widgets/tests.py
+++ b/tests/admin_widgets/tests.py
@@ -881,6 +881,8 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
self.assertEqual(self.has_css_class(remove_all_link, 'active'), remove_all)
def execute_basic_operations(self, mode, field_name):
+ original_url = self.selenium.current_url
+
from_box = '#id_%s_from' % field_name
to_box = '#id_%s_to' % field_name
choose_link = 'id_%s_add_link' % field_name
@@ -1014,6 +1016,9 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
self.get_select_option(to_box, str(self.jason.id)).click()
self.get_select_option(to_box, str(self.john.id)).click()
+ # Pressing buttons shouldn't change the URL.
+ self.assertEqual(self.selenium.current_url, original_url)
+
def test_basic(self):
self.school.students.set([self.lisa, self.peter])
self.school.alumni.set([self.lisa, self.peter])