From f7f001542a06f1fa816953779684f6b62d6e3908 Mon Sep 17 00:00:00 2001 From: markotibold Date: Wed, 9 Mar 2011 10:39:45 +0100 Subject: 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 --- examples/pygments_api/tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/pygments_api/tests.py') 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 -- cgit v1.2.3