mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-04 22:17:34 +00:00
allow regexes only on strings
This commit is contained in:
parent
a880b1f6f9
commit
d126c3acef
2 changed files with 5 additions and 1 deletions
|
|
@ -11,3 +11,7 @@ class RegexValidatorTest(TestCase):
|
|||
def testDoesntMatchRegex(self):
|
||||
validator = RegexValidator(re.compile("abc"))
|
||||
self.assertFalse(validator.isValid("xyz"))
|
||||
|
||||
def testFailsIfValueIsNoString(self):
|
||||
validator = RegexValidator(re.compile("abc"))
|
||||
self.assertFalse(validator.isValid(42))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue