diff options
author | Akshesh <aksheshdoshi@gmail.com> | 2016-02-16 03:40:00 +0530 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-02-18 18:58:18 -0500 |
commit | d58aaa24e31f10e56a7f05a4451cd06a3cc6e65d (patch) | |
tree | 75b2a1d79cd855a4f8fce44212624f466cf9a7b9 /tests/validators | |
parent | b954ad0640e1f246f60f31a07a567274c2f20751 (diff) | |
download | django-d58aaa24e31f10e56a7f05a4451cd06a3cc6e65d.tar.gz |
Fixed #26107 -- Added option to int_list_validator() to allow negative integers.
Diffstat (limited to 'tests/validators')
-rw-r--r-- | tests/validators/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/validators/tests.py b/tests/validators/tests.py index ad82eb6132..3266b5832b 100644 --- a/tests/validators/tests.py +++ b/tests/validators/tests.py @@ -172,6 +172,11 @@ TEST_DATA = [ (validate_comma_separated_integer_list, '1,,2', ValidationError), (int_list_validator(sep='.'), '1.2.3', None), + (int_list_validator(sep='.', allow_negative=True), '1.2.3', None), + (int_list_validator(allow_negative=True), '-1,-2,3', None), + (int_list_validator(allow_negative=True), '1,-2,-12', None), + + (int_list_validator(), '-1,2,3', ValidationError), (int_list_validator(sep='.'), '1,2,3', ValidationError), (int_list_validator(sep='.'), '1.2.3\n', ValidationError), |