Backport common mixin and generics improvements

* Rename get_object_list to get_source_queryset.
* Add uniqueness validation to SingleObjectCreateView.
* Remove MultipleInstanceActionMixin.
* Backport MultipleObjectMixin improvements.
* Remove ObjectListPermissionFilterMixin.
* Add and improve tests.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-06 02:07:35 -04:00
parent 7181852c2d
commit 95a1df8072
72 changed files with 1330 additions and 1092 deletions

View File

@@ -30,7 +30,7 @@ class DocumentContentViewsTestCase(GenericDocumentViewTestCase):
def test_document_content_view_no_permissions(self):
response = self._request_document_content_view()
self.assertEqual(response.status_code, 403)
self.assertEqual(response.status_code, 404)
def test_document_content_view_with_access(self):
self.grant_access(
@@ -51,7 +51,7 @@ class DocumentContentViewsTestCase(GenericDocumentViewTestCase):
def test_document_page_content_view_no_permissions(self):
response = self._request_document_page_content_view()
self.assertEqual(response.status_code, 403)
self.assertEqual(response.status_code, 404)
def test_document_page_content_view_with_access(self):
self.grant_access(
@@ -96,7 +96,7 @@ class DocumentContentViewsTestCase(GenericDocumentViewTestCase):
def test_document_type_parsing_settings_view_no_permission(self):
response = self._request_test_document_type_parsing_settings()
self.assertEqual(response.status_code, 403)
self.assertEqual(response.status_code, 404)
def test_document_type_parsing_settings_view_with_access(self):
self.grant_access(