summaryrefslogtreecommitdiff
path: root/tests/admin_widgets
diff options
context:
space:
mode:
authorCoen van der Kamp <coen@fourdigits.nl>2023-03-08 20:12:34 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-28 06:58:10 +0200
commit7bbbadc69383f0a2b99253e153b974f8783e876d (patch)
treef0e4e8a38904aa9772fdae066dbda9dfd41d08b6 /tests/admin_widgets
parent070cbac0dbf6a09b55aad322137ab168b75bf56b (diff)
downloaddjango-7bbbadc69383f0a2b99253e153b974f8783e876d.tar.gz
Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
This also deprecates "http" as the default scheme.
Diffstat (limited to 'tests/admin_widgets')
-rw-r--r--tests/admin_widgets/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
index fea7d72616..2977b64596 100644
--- a/tests/admin_widgets/tests.py
+++ b/tests/admin_widgets/tests.py
@@ -22,9 +22,10 @@ from django.db.models import (
ManyToManyField,
UUIDField,
)
-from django.test import SimpleTestCase, TestCase, override_settings
+from django.test import SimpleTestCase, TestCase, ignore_warnings, override_settings
from django.urls import reverse
from django.utils import translation
+from django.utils.deprecation import RemovedInDjango60Warning
from .models import (
Advisor,
@@ -106,6 +107,7 @@ class AdminFormfieldForDBFieldTests(SimpleTestCase):
def test_TextField(self):
self.assertFormfield(Event, "description", widgets.AdminTextareaWidget)
+ @ignore_warnings(category=RemovedInDjango60Warning)
def test_URLField(self):
self.assertFormfield(Event, "link", widgets.AdminURLFieldWidget)
@@ -320,6 +322,7 @@ class AdminForeignKeyRawIdWidget(TestDataMixin, TestCase):
def setUp(self):
self.client.force_login(self.superuser)
+ @ignore_warnings(category=RemovedInDjango60Warning)
def test_nonexistent_target_id(self):
band = Band.objects.create(name="Bogey Blues")
pk = band.pk
@@ -335,6 +338,7 @@ class AdminForeignKeyRawIdWidget(TestDataMixin, TestCase):
"Select a valid choice. That choice is not one of the available choices.",
)
+ @ignore_warnings(category=RemovedInDjango60Warning)
def test_invalid_target_id(self):
for test_str in ("Iñtërnâtiônàlizætiøn", "1234'", -1234):
# This should result in an error message, not a server exception.
@@ -1610,6 +1614,7 @@ class HorizontalVerticalFilterSeleniumTests(AdminWidgetSeleniumTestCase):
self.assertCountSeleniumElements("#id_students_to > option", 2)
+@ignore_warnings(category=RemovedInDjango60Warning)
class AdminRawIdWidgetSeleniumTests(AdminWidgetSeleniumTestCase):
def setUp(self):
super().setUp()