From 249a6190aef5e3676c6d9aa6c38cecff895b5993 Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Wed, 27 Nov 2019 22:34:07 +0700 Subject: [PATCH] Fixed #30975 -- Replaced custom get_select_option with Selenium's select_by_value. --- django/contrib/admin/tests.py | 22 +++++++++++------ tests/admin_views/tests.py | 10 ++++---- tests/admin_widgets/tests.py | 46 +++++++++++++++++++---------------- 3 files changed, 44 insertions(+), 34 deletions(-) diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py index 86745202a9..5ea233ad5e 100644 --- a/django/contrib/admin/tests.py +++ b/django/contrib/admin/tests.py @@ -141,17 +141,23 @@ class AdminSeleniumTestCase(SeleniumTestCase, StaticLiveServerTestCase): return self.selenium.execute_script( 'return django.jQuery("%s").css("%s")' % (selector, attribute)) - def get_select_option(self, selector, value): + def select_option(self, selector, value): """ - Return the