X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/99f6dd4f1ff0390de9a9bbd4e3352b953cb9a235..1bf869129aa603b63574240385dd76d8975bfa34:/apps/api/tests.py diff --git a/apps/api/tests.py b/apps/api/tests.py index b72af1b22..0a638dc3f 100644 --- a/apps/api/tests.py +++ b/apps/api/tests.py @@ -16,7 +16,7 @@ import picture.tests @override_settings( - API_WAIT=-1, + API_WAIT=-1, CACHES = {'api': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}, 'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}, 'permanent': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}} @@ -35,10 +35,10 @@ class ChangesTest(ApiTest): book.save() changes = json.loads(self.client.get('/api/changes/0.json?book_fields=title&tag_fields=name').content) - self.assertEqual(changes['updated']['books'], + self.assertEqual(changes['updated']['books'], [{'id': book.id, 'title': book.title}], 'Invalid book format in changes') - self.assertEqual(changes['updated']['tags'], + self.assertEqual(changes['updated']['tags'], [{'id': tag.id, 'name': tag.name}], 'Invalid tag format in changes') @@ -157,5 +157,4 @@ class PictureTests(ApiTest): if import_form.is_valid(): import_form.save() - pic = Picture.objects.get(slug=slug) - + Picture.objects.get(slug=slug)