示例#1
0
 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))
示例#2
0
 def test_good_username(self):
     self.assertTrue(checks.username_is_valid("@merc1er"))
示例#3
0
 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))