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