Example #1
0
 def test_ip(self):
     assert Validator.ip('127.0.0.1')
     assert not Validator.ip('127.0.0.256')
Example #2
0
 def test_match(self):
     assert Validator.match(r'[a-zA-Z0-9]', 'TestString123')
     assert not Validator.match(r'^[a-zA-Z]$', 'Test-String123')
Example #3
0
 def test_domain(self):
     assert Validator.domain('example.com')
     assert Validator.domain('example1.example.com')
     assert Validator.domain('example1.example.com.')