Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Julien Phalip authored February 19, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/contrib/admin/tests.py
2  django/contrib/admin/tests.py
... ...
@@ -1,5 +1,4 @@
1 1
 import sys
2  
-from selenium.common.exceptions import NoSuchElementException
3 2
 
4 3
 from django.test import LiveServerTestCase
5 4
 from django.utils.importlib import import_module
@@ -79,6 +78,7 @@ def select_option(self, selector, value):
79 78
         Helper function to select the <OPTION> that has the value `value` and
80 79
         that is in the <SELECT> widget identified by the CSS selector `selector`.
81 80
         """
  81
+        from selenium.common.exceptions import NoSuchElementException
82 82
         options = self.selenium.find_elements_by_css_selector('%s option' % selector)
83 83
         for option in options:
84 84
             if option.get_attribute('value') == value:

0 notes on commit e1bbf3b

Please sign in to comment.
Something went wrong with that request. Please try again.