Esempio n. 1
0
 def test_avatar(self):
     print("""test avatar""")
     u = User(nickname='john', email='*****@*****.**')
     avatar = u.avatar(128)
     excepted = 'http://www.gravatar.com/avatar/d4c74594d841139328695756648b6bd6'
     assert avatar[0:len(excepted)] == excepted
Esempio n. 2
0
 def test_avatar(self):
     u = User(username='******', email='*****@*****.**')
     self.assertEqual(u.avatar(128), ('https://www.gravatar.com/avatar/'
                                      'd4c74594d841139328695756648b6bd6'
                                      '?d=identicon&s=128'))
Esempio n. 3
0
 def test_avatar(self):
     u = User(username='******', email='*****@*****.**')
     self.assertEqual(
         u.avatar(128),
         'https://gravatar.com/avatar/d4c74594d841139328695756648b6bd6?d=retro&s=128'
     )