comparison antispam/tests/test_utils.py @ 789:9e803323a0d0

Removing AUTH_PROFILE_MODULE and get_profile().
author Brian Neal <bgneal@gmail.com>
date Fri, 23 May 2014 15:10:11 -0500
parents 8789299c75b1
children
comparison
equal deleted inserted replaced
788:84aa49497718 789:9e803323a0d0
54 54
55 """ 55 """
56 user = User.objects.create_user('spammer_guy', '', 'password') 56 user = User.objects.create_user('spammer_guy', '', 'password')
57 user.save() 57 user.save()
58 58
59 profile = user.get_profile() 59 profile = user.profile
60 profile.location = 'Spamville' 60 profile.location = 'Spamville'
61 profile.country = 'US' 61 profile.country = 'US'
62 profile.birthday = datetime.date.today() 62 profile.birthday = datetime.date.today()
63 profile.occupation = 'Spammer' 63 profile.occupation = 'Spammer'
64 profile.interests = 'Spamming websites' 64 profile.interests = 'Spamming websites'
91 shout = Shout(user=user, shout_date=now, shout='spam') 91 shout = Shout(user=user, shout_date=now, shout='spam')
92 shout.save() 92 shout.save()
93 93
94 deactivate_spammer(user) 94 deactivate_spammer(user)
95 95
96 profile = user.get_profile() 96 profile = user.profile
97 self.assertFalse(profile.location) 97 self.assertFalse(profile.location)
98 self.assertFalse(profile.country) 98 self.assertFalse(profile.country)
99 self.assertIsNone(profile.birthday) 99 self.assertIsNone(profile.birthday)
100 self.assertFalse(profile.occupation) 100 self.assertFalse(profile.occupation)
101 self.assertFalse(profile.interests) 101 self.assertFalse(profile.interests)