comparison forums/tests/test_views.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
129 if post: 129 if post:
130 self.assertEqual(post.body, post3_body) 130 self.assertEqual(post.body, post3_body)
131 self.assertEqual(post.user.pk, self.user.pk) 131 self.assertEqual(post.user.pk, self.user.pk)
132 self.assertEqual(topic.post_count, 3) 132 self.assertEqual(topic.post_count, 3)
133 133
134 profile = self.user.get_profile() 134 # our cached copy of the profile is out of date; need to refetch from
135 # the database
136 user = User.objects.get(username=self.username)
137 profile = user.profile
135 self.assertEqual(profile.forum_post_count, 3) 138 self.assertEqual(profile.forum_post_count, 3)