We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b93980 commit 4b6c998Copy full SHA for 4b6c998
1 file changed
tests/forms_tests/field_tests/test_urlfield.py
@@ -209,6 +209,20 @@ def test_urlfield_assume_scheme_when_colons(self):
209
with self.subTest(value=value):
210
self.assertEqual(f.clean(value), expected)
211
212
+ def test_urlfield_non_hierarchical_schemes_unchanged_in_to_python(self):
213
+ f = URLField()
214
+ tests = [
215
+ "mailto:test@example.com",
216
+ "mailto:test@example.com?subject=Hello",
217
+ "tel:+1-800-555-0100",
218
+ "tel:555-0100",
219
+ "urn:isbn:0-486-27557-4",
220
+ "urn:ietf:rfc:2648",
221
+ ]
222
+ for value in tests:
223
+ with self.subTest(value=value):
224
+ self.assertEqual(f.to_python(value), value)
225
+
226
def test_custom_validator_longer_max_length(self):
227
228
class CustomLongURLValidator(URLValidator):
0 commit comments