예제 #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))
예제 #2
0
 def test_profile_avatar_default(self):
     profile(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
예제 #3
0
 def test_profile_avatar_anonymous(self):
     eq_(settings.DEFAULT_AVATAR, profile_avatar(AnonymousUser()))
예제 #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))
예제 #5
0
 def test_profile_avatar(self):
     self.u.email = '*****@*****.**'
     ok_(md5(self.u.email).hexdigest() in profile_avatar(self.u))
예제 #6
0
파일: test_helpers.py 프로젝트: gerv/kuma
 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))
예제 #7
0
파일: test_helpers.py 프로젝트: gerv/kuma
 def test_profile_avatar(self):
     self.u.email = '*****@*****.**'
     ok_(md5(self.u.email).hexdigest() in profile_avatar(self.u))
예제 #8
0
 def test_profile_avatar_default(self):
     Profile.objects.create(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
예제 #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))
예제 #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))
예제 #11
0
 def test_profile_avatar_default(self):
     Profile.objects.create(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))
예제 #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))
예제 #13
0
 def test_profile_avatar_anonymous(self):
     eq_(settings.DEFAULT_AVATAR, profile_avatar(AnonymousUser()))
예제 #14
0
 def test_profile_avatar_default(self):
     profile(user=self.u)
     eq_(settings.DEFAULT_AVATAR, profile_avatar(self.u))