From ccb1cfb64e919e163c51995ed99bff3c92d7d006 Mon Sep 17 00:00:00 2001 From: Yash Saini Date: Fri, 8 May 2020 14:34:08 +0530 Subject: Fixed #31548 -- Fixed URLValidator crash on non-strings. --- tests/validators/tests.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/validators') diff --git a/tests/validators/tests.py b/tests/validators/tests.py index baa744a9a6..5127bfecf5 100644 --- a/tests/validators/tests.py +++ b/tests/validators/tests.py @@ -222,6 +222,8 @@ TEST_DATA = [ (URLValidator(EXTENDED_SCHEMES), 'git+ssh://git@github.com/example/hg-git.git', None), (URLValidator(EXTENDED_SCHEMES), 'git://-invalid.com', ValidationError), + (URLValidator(), None, ValidationError), + (URLValidator(), 56, ValidationError), (URLValidator(), 'no_scheme', ValidationError), # Trailing newlines not accepted (URLValidator(), 'http://www.djangoproject.com/\n', ValidationError), -- cgit v1.3