Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved an import statement to handle the case where selenium isn't ins…

…talled.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e1bbf3b6bc8a10cfea9c3101434b13d202637830 1 parent f0c2228
@jphalip jphalip authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/tests.py
View
2  django/contrib/admin/tests.py
@@ -1,5 +1,4 @@
import sys
-from selenium.common.exceptions import NoSuchElementException
from django.test import LiveServerTestCase
from django.utils.importlib import import_module
@@ -79,6 +78,7 @@ def select_option(self, selector, value):
Helper function to select the <OPTION> that has the value `value` and
that is in the <SELECT> widget identified by the CSS selector `selector`.
"""
+ from selenium.common.exceptions import NoSuchElementException
options = self.selenium.find_elements_by_css_selector('%s option' % selector)
for option in options:
if option.get_attribute('value') == value:
Please sign in to comment.
Something went wrong with that request. Please try again.