Esempio n. 1
0
 def test_invalidName(self):
     self.assertEqual(False, ipavalidate.GoodName("foo bar"))
     self.assertEqual(False, ipavalidate.GoodName("foo%bar"))
     self.assertEqual(False, ipavalidate.GoodName("*foo"))
     self.assertEqual(False, ipavalidate.GoodName("$foo.bar$"))
Esempio n. 2
0
 def test_invalidName(self):
     assert ipavalidate.GoodName("foo bar") is False
     assert ipavalidate.GoodName("foo%bar") is False
     assert ipavalidate.GoodName("*foo") is False
     assert ipavalidate.GoodName("$foo.bar$") is False
Esempio n. 3
0
 def test_validName(self):
     self.assertEqual(True, ipavalidate.GoodName("foo"))
     self.assertEqual(True, ipavalidate.GoodName("1foo"))
     self.assertEqual(True, ipavalidate.GoodName("foo.bar"))
     self.assertEqual(True, ipavalidate.GoodName("foo.bar$"))
Esempio n. 4
0
 def test_validName(self):
     assert ipavalidate.GoodName("foo") is True
     assert ipavalidate.GoodName("1foo") is True
     assert ipavalidate.GoodName("foo.bar") is True
     assert ipavalidate.GoodName("foo.bar$") is True