diff --git a/tests/validators/tests.py b/tests/validators/tests.py index ba7038094c..d7888ef9a7 100644 --- a/tests/validators/tests.py +++ b/tests/validators/tests.py @@ -248,13 +248,19 @@ TEST_DATA = [ (RegexValidator('a', flags=re.IGNORECASE), 'A', None), (FileExtensionValidator(['txt']), ContentFile('contents', name='fileWithUnsupportedExt.jpg'), ValidationError), - (FileExtensionValidator(['txt']), ContentFile('contents', name='fileWithNoExtenstion'), ValidationError), + (FileExtensionValidator(['txt']), ContentFile('contents', name='fileWithUnsupportedExt.JPG'), ValidationError), + (FileExtensionValidator(['txt']), ContentFile('contents', name='fileWithNoExtension'), ValidationError), + (FileExtensionValidator(['']), ContentFile('contents', name='fileWithAnExtension.txt'), ValidationError), (FileExtensionValidator([]), ContentFile('contents', name='file.txt'), ValidationError), + + (FileExtensionValidator(['']), ContentFile('contents', name='fileWithNoExtension'), None), (FileExtensionValidator(['txt']), ContentFile('contents', name='file.txt'), None), + (FileExtensionValidator(['txt']), ContentFile('contents', name='file.TXT'), None), (FileExtensionValidator(), ContentFile('contents', name='file.jpg'), None), (validate_image_file_extension, ContentFile('contents', name='file.jpg'), None), (validate_image_file_extension, ContentFile('contents', name='file.png'), None), + (validate_image_file_extension, ContentFile('contents', name='file.PNG'), None), (validate_image_file_extension, ContentFile('contents', name='file.txt'), ValidationError), (validate_image_file_extension, ContentFile('contents', name='file'), ValidationError), ]