Skip to content

Commit a0a377d

Browse files
committed
set assume_scheme for django 5.0 and above to silence the corresponding warning
1 parent a167305 commit a0a377d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_openapi_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,10 @@ def test_choice_fields_with_error_codes():
595595

596596
class MultiValueForm(forms.Form):
597597
split = forms.SplitDateTimeField()
598-
disabled = forms.URLField(disabled=True)
598+
if django.VERSION >= (5, 0):
599+
disabled = forms.URLField(disabled=True, assume_scheme="https")
600+
else:
601+
disabled = forms.URLField(disabled=True)
599602

600603

601604
def test_multi_value_fields_with_error_codes():

0 commit comments

Comments
 (0)