Exemplo n.º 1
0
 def test_profile_avatar(self):
     profile(user=self.u, avatar='images/foo.png')
     eq_('%simages/foo.png' % settings.MEDIA_URL, profile_avatar(self.u))
Exemplo n.º 2
0
 def test_profile_avatar_default(self):
     profile(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
Exemplo n.º 3
0
 def test_profile_avatar_anonymous(self):
     eq_(settings.DEFAULT_AVATAR, profile_avatar(AnonymousUser()))
Exemplo n.º 4
0
 def test_profile_default_gravatar(self):
     ok_(urllib.urlencode({'d': settings.DEFAULT_AVATAR}) in profile_avatar(self.u), "Bad default avatar: %s" % profile_avatar(self.u))
Exemplo n.º 5
0
 def test_profile_avatar(self):
     self.u.email = '*****@*****.**'
     ok_(md5(self.u.email).hexdigest() in profile_avatar(self.u))
Exemplo n.º 6
0
 def test_profile_default_gravatar(self):
     d_param = urllib.urlencode({'d': settings.DEFAULT_AVATAR})
     ok_(d_param in profile_avatar(self.u),
         "Bad default avatar: %s" % profile_avatar(self.u))
Exemplo n.º 7
0
 def test_profile_avatar(self):
     self.u.email = '*****@*****.**'
     ok_(md5(self.u.email).hexdigest() in profile_avatar(self.u))
Exemplo n.º 8
0
 def test_profile_avatar_default(self):
     Profile.objects.create(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
Exemplo n.º 9
0
 def test_profile_avatar(self):
     profile = Profile(user=self.u)
     profile.avatar = 'images/foo.png'
     profile.save()
     eq_('%simages/foo.png' % settings.MEDIA_URL, profile_avatar(self.u))
Exemplo n.º 10
0
 def test_profile_avatar(self):
     profile = Profile(user=self.u)
     profile.avatar = 'images/foo.png'
     profile.save()
     eq_('%simages/foo.png' % settings.MEDIA_URL, profile_avatar(self.u))
Exemplo n.º 11
0
 def test_profile_avatar_default(self):
     Profile.objects.create(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
Exemplo n.º 12
0
 def test_profile_avatar(self):
     profile(user=self.u, avatar='images/foo.png')
     eq_('%simages/foo.png' % settings.MEDIA_URL, profile_avatar(self.u))
Exemplo n.º 13
0
 def test_profile_avatar_anonymous(self):
     eq_(settings.DEFAULT_AVATAR, profile_avatar(AnonymousUser()))
Exemplo n.º 14
0
 def test_profile_avatar_default(self):
     profile(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))