Author: julien Date: 2012-02-19 08:53:55 -0800 (Sun, 19 Feb 2012) New Revision: 17563
Modified: django/trunk/django/contrib/admin/tests.py Log: Moved an import statement to handle the case where selenium isn't installed. Modified: django/trunk/django/contrib/admin/tests.py =================================================================== --- django/trunk/django/contrib/admin/tests.py 2012-02-19 16:42:12 UTC (rev 17562) +++ django/trunk/django/contrib/admin/tests.py 2012-02-19 16:53:55 UTC (rev 17563) @@ -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 @@ 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: -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.