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
+2 -2
View File
@@ -39,7 +39,7 @@ class SmartLinkViewTestCase(SmartLinkTestMixin, SmartLinkViewTestMixin, GenericV
self._create_test_smart_link()
response = self._request_test_smart_link_delete_view()
self.assertEqual(response.status_code, 403)
self.assertEqual(response.status_code, 404)
self.assertEqual(SmartLink.objects.count(), 1)
@@ -58,7 +58,7 @@ class SmartLinkViewTestCase(SmartLinkTestMixin, SmartLinkViewTestMixin, GenericV
self._create_test_smart_link()
response = self._request_test_smart_link_edit_view()
self.assertEqual(response.status_code, 403)
self.assertEqual(response.status_code, 404)
self.test_smart_link.refresh_from_db()
self.assertEqual(self.test_smart_link.label, TEST_SMART_LINK_LABEL)