Commit 1bf9ca37 authored by okhin's avatar okhin

Fixing the test for the feedbacks

parent a7b5ef8e
......@@ -70,6 +70,7 @@ class FeedbackViewTest(APITestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(Feedback.objects.count(), 1)
self.assertEqual(Feedback.objects.get().comment, 'Feedback')
# A category which does not exists should raise an error
data = {'callee':, 'category': 1234567, 'comment': 'Feedback'}
with self.assertRaises(Exception):'/campaigns/%(cid)d/feedbacks/' % {'cid':}, data, format='json')
response ='/campaigns/%(cid)d/feedbacks/' % {'cid':}, data, format='json')
assert response.status_code >= 400
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment