Beispiel #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))
Beispiel #2
0
 def test_profile_avatar_default(self):
     profile(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
Beispiel #3
0
 def test_profile_avatar_anonymous(self):
     eq_(settings.DEFAULT_AVATAR, profile_avatar(AnonymousUser()))
Beispiel #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))
Beispiel #5
0
 def test_profile_avatar(self):
     self.u.email = '*****@*****.**'
     ok_(md5(self.u.email).hexdigest() in profile_avatar(self.u))
Beispiel #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))
Beispiel #7
0
 def test_profile_avatar(self):
     self.u.email = '*****@*****.**'
     ok_(md5(self.u.email).hexdigest() in profile_avatar(self.u))
Beispiel #8
0
 def test_profile_avatar_default(self):
     Profile.objects.create(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
Beispiel #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))
Beispiel #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))
Beispiel #11
0
 def test_profile_avatar_default(self):
     Profile.objects.create(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
Beispiel #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))
Beispiel #13
0
 def test_profile_avatar_anonymous(self):
     eq_(settings.DEFAULT_AVATAR, profile_avatar(AnonymousUser()))
Beispiel #14
0
 def test_profile_avatar_default(self):
     profile(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))