switched to buildin status code

This commit is contained in:
Stephan Groß 2012-11-05 17:01:51 +01:00
parent 42c0099e01
commit 6ee5d86093

View File

@ -183,7 +183,7 @@ class TestCreateWithForeignKeys(TestCase):
request = factory.post('/comments/', data=data) request = factory.post('/comments/', data=data)
response = self.create_view(request).render() response = self.create_view(request).render()
self.assertEqual(response.status_code, 201) self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(self.post.blogpostcomment_set.count(), 1) self.assertEqual(self.post.blogpostcomment_set.count(), 1)
self.assertEqual(self.post.blogpostcomment_set.all()[0].text, 'A test comment') self.assertEqual(self.post.blogpostcomment_set.all()[0].text, 'A test comment')