summaryrefslogtreecommitdiff
path: root/tests/validators
AgeCommit message (Collapse)Author
2021-01-04Fixed #32298 -- Fixed URLValidator hostname length validation.Akshat1Nar
URLValidator now validates the maximum length of a hostname without the userinfo and port.
2020-07-16Fixed typo in DecimalValidator tests.Claudio Catterina
This replaces redundant test for -Infinity with +Infinity.
2020-06-18Refs #31670 -- Renamed whitelist argument and attribute of EmailValidator.David Smith
2020-05-08Fixed #31548 -- Fixed URLValidator crash on non-strings.Yash Saini
2020-05-08Added URLValidator test for missing scheme.Yash Saini
2020-02-13Fixed #31267 -- Added tests cases with empty username or password for ↵Dennis Schwertel
URLValidator. Follow up to cdcf4164bec9dc09465424d7042c3f9d4f0f1fdc.
2019-10-01Fixed #30651 -- Made __eq__() methods return NotImplemented for not ↵ElizabethU
implemented comparisons. Changed __eq__ to return NotImplemented instead of False if compared to an object of the same type, as is recommended by the Python data model reference. Now these models can be compared to ANY (or other objects with __eq__ overwritten) without returning False automatically.
2018-10-22Fixed #29860 -- Allowed BaseValidator to accept a callable limit_value.buzzi
2018-08-18Refactored validators tests to use subtests.Tom Forbes
2018-07-23Fixed #29528 -- Made URLValidator reject invalid characters in the username ↵Tim Bell
and password.
2018-01-10Fixed #29007 -- Fixed DecimalValidator crash on NaN, SNan, Inf, and Infinity ↵Fabio Bonelli
values.
2017-09-27Fixed #28562 -- Fixed DecimalValidator handling of positive exponent ↵Josh Schneier
scientific notation.
2017-09-11Added tests for DecimalValidator.Josh Schneier
2017-08-12Fixed #28201 -- Added ProhibitNullCharactersValidator and used it on ↵Alejandro Zamora
CharField form field.
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-06-07Fixed #28165 -- Ignored case in FileExtensionValidator's allowed_extensions.Arne de Laat
2017-06-07Added FileExtensionValidator tests for uppercase and missing file extensions.Arne de Laat
2017-01-20Refs #23919 -- Removed str_prefix usageClaude Paroz
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-18Refs #23919 -- Replaced io.open() with open().Aymeric Augustin
io.open() is an alias for open() on Python 3.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-10-28Fixed #26578 -- Prohibited non-ASCII digits in validate_ipv4_address.wim glenn
2016-07-02Refs #21548 -- Skipped tests that rely on pillow when it's not installedBaptiste Mispelon
2016-06-30Fixed #21548 -- Added FileExtensionValidator and validate_image_file_extension.Berker Peksag
2016-06-28Fixed #26119 -- Fixed URLValidator crash on URLs with brackets.Christopher Grebs
2016-06-28Replaced use of TestCase.fail() with assertRaises().Tim Graham
Also removed try/except/fail antipattern that hides exceptions.
2016-02-18Fixed #26204 -- Reallowed dashes in top-level domains for URLValidator.Tim Graham
Thanks Shai Berger for the review.
2016-02-18Fixed #26107 -- Added option to int_list_validator() to allow negative integers.Akshesh
2015-12-08Fixed #25637 -- Added URLValidator hostname length validation.Raphael Michel
URLValidator now validates the maximum length of a hostname and the maximum length of all labels inside the hostname.
2015-10-31Fixed #25635 -- Made URLValidator allow '+' in scheme.Dheerendra Rathor
2015-10-29Fixed #25620 -- Made URLValidator prohibit URLs with consecutive dots in the ↵Dheerendra Rathor
domain section.
2015-09-18Fixed #24636 -- Added model field validation for decimal places and max digits.Iulia Chiriac
2015-09-04Refs #25345 -- Updated links to code.google.com.Maxime Lorant
2015-07-17Fixed #16501 -- Added an allow_unicode parameter to SlugField.Edward Henderson
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-07-08Fixed catastrophic backtracking in URLValidator.Shai Berger
Thanks João Silva for reporting the problem and Tim Graham for finding the problematic RE and for review. This is a security fix; disclosure to follow shortly.
2015-07-08Prevented newlines from being accepted in some validators.Tim Graham
This is a security fix; disclosure to follow shortly. Thanks to Sjoerd Job Postmus for the report and draft patch.
2015-07-06Fixed #25059 -- Allowed Punycode TLDs in URLValidatorAlexey Sveshnikov
2015-04-17Fixed #24349 -- Limited domain name labels to 63 characters in EmailValidatorAnoop Thomas Mathew
2015-03-25Fixed #24531 -- Improved CommaSeparatedIntegerField validation.Bertrand Bordage
`','`, `'1,,1'`, `',1'` etc. are no longer considered as valid comma-separated integer lists.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-06Fixed #20003 -- Improved and extended URLValidatorDanilo Bargen
This adds support for authentication data (`user:password`) in URLs, IPv6 addresses, and unicode domains. The test suite has been improved by adding test URLs from http://mathiasbynens.be/demo/url-regex (with a few adjustments, like allowing local and reserved IPs). The previous URL validation regex failed this test suite on 13 occasions, the validator was updated based on https://gist.github.com/dperini/729294.
2014-11-03Refactored URLValidator tests by moving URLs to text files.Danilo Bargen
2014-07-26Fixed #16617 -- Added 'value' to BaseValidator params.Anubhav Joshi
Also allowed overriding the default messages in subclasses of BaseValidator. Thanks sperrygrove for initial patch.
2014-07-04Corrected domain max length for EmailValidator; refs #20631.Tim Graham
Thanks MarkusH for the report.
2014-07-04Fixed #20631 -- Increased the default EmailField max_length to 254.Tim Graham
Thanks pmartin for the report.
2014-05-16Fixed #22579 -- Corrected validation for email to reject trailing slashErik Romijn
Thanks to Claude Paroz for the report and patch and Tomasz Paczkowski for the review.
2014-05-08Fixed #22588 -- Fix RegexValidator __eq__David Szotten
Compare parameters instead of re.pattern instances, and add the other parameters to the comparison. Also add a __ne__ to make assertNotEqual work properly.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor