diff options
Diffstat (limited to 'askbot/tests/badge_tests.py')
-rw-r--r-- | askbot/tests/badge_tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/askbot/tests/badge_tests.py b/askbot/tests/badge_tests.py index fdb9d626..38a93043 100644 --- a/askbot/tests/badge_tests.py +++ b/askbot/tests/badge_tests.py @@ -164,8 +164,8 @@ class BadgeTests(AskbotTestCase): def test_popular_question_badge(self): question = self.post_question(user = self.u1) min_views = settings.POPULAR_QUESTION_BADGE_MIN_VIEWS - question.view_count = min_views - 1 - question.save() + question.thread.view_count = min_views - 1 + question.thread.save() #patch not_a_robot_request to return True from askbot.utils import functions @@ -182,8 +182,8 @@ class BadgeTests(AskbotTestCase): self.assert_have_badge('popular-question', recipient = self.u1, expected_count = 1) question2 = self.post_question(user = self.u1) - question2.view_count = min_views - 1 - question2.save() + question2.thread.view_count = min_views - 1 + question2.thread.save() self.client.login(method='force', user_id = self.u2.id) self.client.get(question2.get_absolute_url()) self.assert_have_badge('popular-question', recipient = self.u1, expected_count = 2) |