diff options
author | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-12-05 12:47:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-05 12:47:31 +0100 |
commit | 6410d38ca7255961c08f1d657fdf920555d113f3 (patch) | |
tree | 70da2283f58947b42bcc5493c7f17b901ef9293c /tests/admin_inlines | |
parent | adb96617897690b3a01e39e8297ae7d67825d2bc (diff) | |
download | django-6410d38ca7255961c08f1d657fdf920555d113f3.tar.gz |
Moved selenium import to nested scope.
Diffstat (limited to 'tests/admin_inlines')
-rw-r--r-- | tests/admin_inlines/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py index eb276e56d1..95eb7104ab 100644 --- a/tests/admin_inlines/tests.py +++ b/tests/admin_inlines/tests.py @@ -1,5 +1,3 @@ -from selenium.common.exceptions import NoSuchElementException - from django.contrib.admin import ModelAdmin, TabularInline from django.contrib.admin.helpers import InlineAdminForm from django.contrib.admin.tests import AdminSeleniumTestCase @@ -1152,6 +1150,7 @@ class SeleniumTests(AdminSeleniumTestCase): self.assertEqual(Profile.objects.all().count(), 3) def test_add_inline_link_absent_for_view_only_parent_model(self): + from selenium.common.exceptions import NoSuchElementException user = User.objects.create_user('testing', password='password', is_staff=True) user.user_permissions.add( Permission.objects.get(codename='view_poll', content_type=ContentType.objects.get_for_model(Poll)) |