API updates

- Move all generic API classes definitions to the rest_api.generics
module.
- Update API status code on insufficient access for the apps:
indexes, parsing, documents, metadata, ocr, permission,
user management.
- Update API tests.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-10-28 00:01:11 -04:00
parent c79a974746
commit deb363ee16
31 changed files with 232 additions and 244 deletions

View File

@@ -28,7 +28,7 @@ class DocumentParsingAPITestCase(DocumentTestMixin, BaseAPITestCase):
def test_get_document_version_page_content_no_access(self):
response = self._request_document_page_content_view()
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
def test_get_document_version_page_content_with_access(self):
self.grant_access(