mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-03 23:14:07 +03:00
switched to buildin status code
This commit is contained in:
parent
42c0099e01
commit
6ee5d86093
|
@ -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')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user