diff options
| author | markotibold | 2011-03-09 10:39:45 +0100 |
|---|---|---|
| committer | markotibold | 2011-03-09 10:39:45 +0100 |
| commit | f7f001542a06f1fa816953779684f6b62d6e3908 (patch) | |
| tree | 1194861a8961cdaee35ceccf854bab1bccba29c2 /examples/pygments_api/tests.py | |
| parent | f88d8193a8757ce00b91ba81377216559977b519 (diff) | |
| download | django-rest-framework-f7f001542a06f1fa816953779684f6b62d6e3908.tar.bz2 | |
tests.py: the response needed json deserialization. I guess this is the default serialization for responses.
views.py: Implements #28 Pygments examples should be datetime sorted
Diffstat (limited to 'examples/pygments_api/tests.py')
| -rw-r--r-- | examples/pygments_api/tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/pygments_api/tests.py b/examples/pygments_api/tests.py index f70eff0e..76f1afba 100644 --- a/examples/pygments_api/tests.py +++ b/examples/pygments_api/tests.py @@ -1,7 +1,7 @@ from django.test import TestCase
from djangorestframework.compat import RequestFactory
from pygments_api import views
-import os, tempfile, shutil
+import os, tempfile, shutil, time, json
class TestPygmentsExample(TestCase):
@@ -35,7 +35,8 @@ class TestPygmentsExample(TestCase): request = self.factory.get('/pygments')
view = views.PygmentsRoot.as_view()
response = view(request)
- self.assertEquals(locations, response.content)
+ response_locations = json.loads(response.content)
+ self.assertEquals(locations, response_locations)
\ No newline at end of file |
