Code style cleanups

Add keyword arguments. Sort arguments and models.
Move literals to their own module. Prepend handler_ to
signal handlers.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-26 03:32:35 -04:00
parent 20acc24c7f
commit 74c97314d7
160 changed files with 1029 additions and 972 deletions
+4 -4
View File
@@ -18,23 +18,23 @@ class DocumentSearchTestCase(DocumentTestMixin, BaseTestCase):
)
def test_document_page_search_no_access(self):
queryset, elapsed_time = self._perform_document_page_search()
queryset = self._perform_document_page_search()
self.assertFalse(self.document.pages.first() in queryset)
def test_document_page_search_with_access(self):
self.grant_access(
obj=self.test_document, permission=permission_document_view
)
queryset, elapsed_time = self._perform_document_page_search()
queryset = self._perform_document_page_search()
self.assertTrue(self.document.pages.first() in queryset)
def test_document_search_no_access(self):
queryset, elapsed_time = self._perform_document_search()
queryset = self._perform_document_search()
self.assertFalse(self.document in queryset)
def test_document_search_with_access(self):
self.grant_access(
obj=self.test_document, permission=permission_document_view
)
queryset, elapsed_time = self._perform_document_search()
queryset = self._perform_document_search()
self.assertTrue(self.document in queryset)