@@ -0,0 +1,937 @@
+from django.test import TestCase%0Afrom django.test.client import Client%0Afrom django.core.urlresolvers import reverse%0Afrom whats_fresh_api.models import *%0Afrom django.contrib.gis.db import models%0Aimport json%0A%0A%0Aclass StoriesTestCase(TestCase):%0A    fixtures = %5B'whats_fresh_api/tests/testdata/test_fixtures.json'%5D%0A%0A    def setUp(self):%0A        self.expected_json = %22%22%22%0A%7B%0A    %22story%22: %22These are the voyages of the Starfish Enterblub; her five year mission -- to seek out new fish and new fishilizations...%22%0A%7D%22%22%22%0A%0A    def test_url_endpoint(self):%0A       url = reverse('story-details', kwargs=%7B'id': '1'%7D)%0A       self.assertEqual(url, '/stories/1')%0A%0A    def test_json_equals(self):%0A        c = Client()%0A        response = c.get(reverse('story-details', kwargs=%7B'id': '1'%7D)).content%0A        parsed_answer = json.loads(response)%0A%0A        expected_answer = json.loads(self.expected_json)%0A        self.assertTrue(parsed_answer == expected_answer)%0A

Write /stories/<id> view test