def test_check_identity(self): check_identity("Dave Borowitz <*****@*****.**>", "failed to check good identity") check_identity("<*****@*****.**>", "failed to check good identity") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz", "no email") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz <dborowitz", "incomplete email") self.assertRaises(ObjectFormatException, check_identity, "*****@*****.**>", "incomplete email") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz <<*****@*****.**>", "typo") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz <*****@*****.**>>", "typo") self.assertRaises( ObjectFormatException, check_identity, "Dave Borowitz <*****@*****.**>xxx", "trailing characters" )
def test_check_identity(self): check_identity("Dave Borowitz <*****@*****.**>", "failed to check good identity") check_identity("<*****@*****.**>", "failed to check good identity") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz", "no email") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz <dborowitz", "incomplete email") self.assertRaises(ObjectFormatException, check_identity, "*****@*****.**>", "incomplete email") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz <<*****@*****.**>", "typo") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz <*****@*****.**>>", "typo") self.assertRaises(ObjectFormatException, check_identity, "Dave Borowitz <*****@*****.**>xxx", "trailing characters")