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$"))
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
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$"))
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