Example #1
0
 def test_base(self):
     suggested_username = calculate_username('foo@bar.com')
     eq_(suggested_username, 'foo')
Example #2
0
 def test_existing_username(self):
     UserFactory.create(username='foo')
     suggested_username = calculate_username('foo@example.com')
     eq_(suggested_username, 'foo1')
Example #3
0
 def test_existing_username_no_alternative(self):
     UserFactory.create(username='foo')
     suggested_username = calculate_username('fooooo@bar.com')
     eq_(suggested_username, 'WMAO-pvtclchsp9LX3hk8PGRytU')
Example #4
0
 def test_extra_long_email(self):
     suggested_username = calculate_username('fooooo@bar.com')
     eq_(suggested_username, 'foo')