summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/validators/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/modeltests/validators/tests.py b/tests/modeltests/validators/tests.py
index e58526285b..08965c618f 100644
--- a/tests/modeltests/validators/tests.py
+++ b/tests/modeltests/validators/tests.py
@@ -112,6 +112,11 @@ TEST_DATA = (
(BaseValidator(True), True, None),
(BaseValidator(True), False, ValidationError),
+ (RegexValidator(), '', None),
+ (RegexValidator(), 'x1x2', None),
+ (RegexValidator('[0-9]+'), 'xxxxxx', ValidationError),
+ (RegexValidator('[0-9]+'), '1234', None),
+ (RegexValidator(re.compile('[0-9]+')), '1234', None),
(RegexValidator('.*'), '', None),
(RegexValidator(re.compile('.*')), '', None),
(RegexValidator('.*'), 'xxxxx', None),