summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/tests/post_model_tests.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/askbot/tests/post_model_tests.py b/askbot/tests/post_model_tests.py
index cad58388..703603c3 100644
--- a/askbot/tests/post_model_tests.py
+++ b/askbot/tests/post_model_tests.py
@@ -629,8 +629,11 @@ class ThreadRenderCacheUpdateTests(AskbotTestCase):
self.client.logout()
self.client.login(username='user2', password='pswd')
- response = self.client.post(urlresolvers.reverse('vote', kwargs={'id': question.id}), data={'type': '1'},
- HTTP_X_REQUESTED_WITH='XMLHttpRequest') # use AJAX request
+ response = self.client.post(
+ urlresolvers.reverse('vote'),
+ data={'type': '1', 'postId': question.id},
+ HTTP_X_REQUESTED_WITH='XMLHttpRequest'
+ ) # use AJAX request
self.assertEqual(200, response.status_code)
data = simplejson.loads(response.content)
@@ -645,8 +648,11 @@ class ThreadRenderCacheUpdateTests(AskbotTestCase):
###
- response = self.client.post(urlresolvers.reverse('vote', kwargs={'id': question.id}), data={'type': '2'},
- HTTP_X_REQUESTED_WITH='XMLHttpRequest') # use AJAX request
+ response = self.client.post(
+ urlresolvers.reverse('vote'),
+ data={'type': '2', 'postId': question.id},
+ HTTP_X_REQUESTED_WITH='XMLHttpRequest'
+ ) # use AJAX request
self.assertEqual(200, response.status_code)
data = simplejson.loads(response.content)
@@ -665,8 +671,11 @@ class ThreadRenderCacheUpdateTests(AskbotTestCase):
self.client.logout()
self.client.login(username='user2', password='pswd')
- response = self.client.post(urlresolvers.reverse('vote', kwargs={'id': question.id}), data={'type': '0', 'postId': answer.id},
- HTTP_X_REQUESTED_WITH='XMLHttpRequest') # use AJAX request
+ response = self.client.post(
+ urlresolvers.reverse('vote'),
+ data={'type': '0', 'postId': answer.id},
+ HTTP_X_REQUESTED_WITH='XMLHttpRequest'
+ ) # use AJAX request
self.assertEqual(200, response.status_code)
data = simplejson.loads(response.content)