from django.test import TestCase
from django.test.client import Client
from django.core.urlresolvers import reverse
from whats_fresh_api.models import *
from django.contrib.gis.db import models
import json


class StoriesTestCase(TestCase):
    fixtures = ['whats_fresh_api/tests/testdata/test_fixtures.json']

    def setUp(self):
        self.expected_json = """
{
    "error": {
        "error_status": false,
        "error_name": null,
        "error_text": null,
        "error_level": null
    },
    "story": "These are the voyages of the Starfish Enterblub; her five year mission -- to seek out new fish and new fishilizations..."
}"""

    def test_url_endpoint(self):
       url = reverse('story-details', kwargs={'id': '1'})
       self.assertEqual(url, '/stories/1')

    def test_json_equals(self):
        c = Client()
        response = c.get(reverse('story-details', kwargs={'id': '1'})).content
        parsed_answer = json.loads(response)

        expected_answer = json.loads(self.expected_json)
        self.assertTrue(parsed_answer == expected_answer)

@@ -361,11 +361,25 @@
  %22%22%22
+%22
 %0A%7B%0A
+%3C%3C%3C%3C%3C%3C%3C HEAD%0A
     
@@ -653,16 +653,17 @@
 %22%0A%7D%22%22%22%0A%0A
+%0A
     def 

Add error field to expected JSON