aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/hyperlinkedserializers.py
diff options
context:
space:
mode:
authorLudwig Kraatz2012-11-14 11:46:16 +0100
committerLudwig Kraatz2012-11-14 11:46:16 +0100
commit8b999c6bb500a045c6c32412009cbd3b1cd5a56b (patch)
tree3ce280898fe42aabdbc90f862a03c6e67a2f0521 /rest_framework/tests/hyperlinkedserializers.py
parent3a30a9b1cbb4444adf3cbb1d3d80c637b5f4f2ca (diff)
downloaddjango-rest-framework-8b999c6bb500a045c6c32412009cbd3b1cd5a56b.tar.bz2
polishing code
and adding myself to auhtors file
Diffstat (limited to 'rest_framework/tests/hyperlinkedserializers.py')
-rw-r--r--rest_framework/tests/hyperlinkedserializers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/tests/hyperlinkedserializers.py b/rest_framework/tests/hyperlinkedserializers.py
index 5fc935ae..d7effce7 100644
--- a/rest_framework/tests/hyperlinkedserializers.py
+++ b/rest_framework/tests/hyperlinkedserializers.py
@@ -196,7 +196,7 @@ class TestCreateWithForeignKeys(TestCase):
request = factory.post('/comments/', data=data)
response = self.create_view(request).render()
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
- self.assertEqual(response["Location"], 'http://testserver/comments/1/')
+ self.assertEqual(response['Location'], 'http://testserver/comments/1/')
self.assertEqual(self.post.blogpostcomment_set.count(), 1)
self.assertEqual(self.post.blogpostcomment_set.all()[0].text, 'A test comment')
@@ -221,7 +221,7 @@ class TestCreateWithForeignKeysAndCustomSlug(TestCase):
request = factory.post('/photos/', data=data)
response = self.list_create_view(request).render()
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
- self.assertNotIn("Location", response, msg="Location should only be included if there is a 'url' field on the serializer")
+ self.assertNotIn('Location', response, msg='Location should only be included if there is a "url" field on the serializer')
self.assertEqual(self.post.photo_set.count(), 1)
self.assertEqual(self.post.photo_set.all()[0].description, 'A test photo')