示例#1
0
 def test_ip(self):
     assert Validator.ip('127.0.0.1')
     assert not Validator.ip('127.0.0.256')
示例#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')
示例#3
0
 def test_domain(self):
     assert Validator.domain('example.com')
     assert Validator.domain('example1.example.com')
     assert Validator.domain('example1.example.com.')
示例#4
0
 def test_match(self):
     assert Validator.match(r'[a-zA-Z0-9]', 'TestString123')
     assert not Validator.match(r'^[a-zA-Z]$', 'Test-String123')
示例#5
0
 def test_ip(self):
     assert Validator.ip('127.0.0.1')
     assert not Validator.ip('127.0.0.256')
示例#6
0
 def test_domain(self):
     assert Validator.domain('example.com')
     assert Validator.domain('example1.example.com')
     assert Validator.domain('example1.example.com.')
示例#7
0
 def test_NFQDN(self):
     assert Validator.NFQDN('sample-01')
     assert not Validator.NFQDN('sample.sample-01.sample1.example.com.')