def test_bad_usernames(self): self.assertFalse(checks.username_is_valid("baduname")) self.assertFalse(checks.username_is_valid("b@dun@me")) self.assertFalse(checks.username_is_valid("@123")) long_uname = "@iamaveryveryveryveryverylongusername" self.assertFalse(checks.username_is_valid(long_uname))
def test_good_username(self): self.assertTrue(checks.username_is_valid("@merc1er"))
def test_bad_usernames(self): self.assertFalse(checks.username_is_valid('baduname')) self.assertFalse(checks.username_is_valid('b@dun@me')) self.assertFalse(checks.username_is_valid('@123')) long_uname = '@iamaveryveryveryveryverylongusername' self.assertFalse(checks.username_is_valid(long_uname))