From 793fd74d7ffecaf802a014b83c6ac98a51d16596 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sun, 2 Jul 2017 01:16:31 -0400 Subject: [PATCH] Fix tests. Signed-off-by: Roberto Rosario --- mayan/apps/documents/tests/test_views.py | 6 +++--- mayan/apps/metadata/tests/test_views.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mayan/apps/documents/tests/test_views.py b/mayan/apps/documents/tests/test_views.py index e41ce15eb6..edef13ce5d 100644 --- a/mayan/apps/documents/tests/test_views.py +++ b/mayan/apps/documents/tests/test_views.py @@ -207,7 +207,7 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase): with self.document.open() as file_object: self.assert_download_response( - self, response, content=file_object.read(), + response, content=file_object.read(), basename=TEST_SMALL_DOCUMENT_FILENAME, mime_type=self.document.file_mimetype ) @@ -237,7 +237,7 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase): with self.document.open() as file_object: self.assert_download_response( - self, response, content=file_object.read(), + response, content=file_object.read(), basename=TEST_SMALL_DOCUMENT_FILENAME, mime_type=self.document.file_mimetype ) @@ -267,7 +267,7 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase): with self.document.open() as file_object: self.assert_download_response( - self, response, content=file_object.read(), + response, content=file_object.read(), basename='{} - {}'.format( TEST_SMALL_DOCUMENT_FILENAME, self.document.latest_version.timestamp diff --git a/mayan/apps/metadata/tests/test_views.py b/mayan/apps/metadata/tests/test_views.py index 870460eb9d..4b1b1ab03d 100644 --- a/mayan/apps/metadata/tests/test_views.py +++ b/mayan/apps/metadata/tests/test_views.py @@ -59,8 +59,7 @@ class DocumentMetadataTestCase(GenericDocumentViewTestCase): 'metadata:metadata_add', args=(self.document.pk,), data={'metadata_type': self.metadata_type.pk}, follow=True ) - - self.assertContains(response, 'Success', status_code=200) + self.assertContains(response, 'successfully', status_code=200) self.assertEqual(len(self.document.metadata.all()), 1)