diff --git a/edivorce/apps/core/tests/test_api.py b/edivorce/apps/core/tests/test_api.py index 4a05e9df..3c9bb75e 100644 --- a/edivorce/apps/core/tests/test_api.py +++ b/edivorce/apps/core/tests/test_api.py @@ -138,7 +138,7 @@ class APITest(APITestCase): def test_get_file_by_key(self): document = self._create_document() - url = reverse('file_by_key', kwargs={'file_key': document.file.name}) + url = reverse('file_by_key', kwargs={'file_key': document.file.name, 'rotation': 0}) response = self.client.get(url) self.assertEqual(response.status_code, status.HTTP_200_OK) diff --git a/edivorce/apps/core/urls.py b/edivorce/apps/core/urls.py index f37c1737..081db5ab 100644 --- a/edivorce/apps/core/urls.py +++ b/edivorce/apps/core/urls.py @@ -7,7 +7,7 @@ urlpatterns = [ # url(r'^guide$', styleguide.guide), url(r'^api/response$', api.UserResponseHandler.as_view()), url(r'^api/documents/$', api.DocumentCreateView.as_view(), name='documents'), - path('api/documents///', api.get_document_file_by_key, name='document_by_key'), + path('api/documents///', api.get_document_file_by_key, name='file_by_key'), # we add an extra 'x' to the file extension so the siteminder proxy doesn't treat it as an image path('api/documents///x//', api.DocumentView.as_view(), name='document'),