Update tests to rely less on view response text.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-08-30 03:50:37 -04:00
parent 6594756c5b
commit 41b8d6157a
5 changed files with 52 additions and 39 deletions

View File

@@ -51,7 +51,8 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase):
def test_document_list_view_no_permissions(self):
response = self.get('documents:document_list')
self.assertContains(response, 'Total: 0', status_code=200)
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['object_list'].count(), 0)
def test_document_list_view_with_access(self):
self.grant_access(