Fix tests.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-02 01:16:31 -04:00
parent 489b6ae190
commit 793fd74d7f
2 changed files with 4 additions and 5 deletions

View File

@@ -207,7 +207,7 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase):
with self.document.open() as file_object: with self.document.open() as file_object:
self.assert_download_response( self.assert_download_response(
self, response, content=file_object.read(), response, content=file_object.read(),
basename=TEST_SMALL_DOCUMENT_FILENAME, basename=TEST_SMALL_DOCUMENT_FILENAME,
mime_type=self.document.file_mimetype mime_type=self.document.file_mimetype
) )
@@ -237,7 +237,7 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase):
with self.document.open() as file_object: with self.document.open() as file_object:
self.assert_download_response( self.assert_download_response(
self, response, content=file_object.read(), response, content=file_object.read(),
basename=TEST_SMALL_DOCUMENT_FILENAME, basename=TEST_SMALL_DOCUMENT_FILENAME,
mime_type=self.document.file_mimetype mime_type=self.document.file_mimetype
) )
@@ -267,7 +267,7 @@ class DocumentsViewsTestCase(GenericDocumentViewTestCase):
with self.document.open() as file_object: with self.document.open() as file_object:
self.assert_download_response( self.assert_download_response(
self, response, content=file_object.read(), response, content=file_object.read(),
basename='{} - {}'.format( basename='{} - {}'.format(
TEST_SMALL_DOCUMENT_FILENAME, TEST_SMALL_DOCUMENT_FILENAME,
self.document.latest_version.timestamp self.document.latest_version.timestamp

View File

@@ -59,8 +59,7 @@ class DocumentMetadataTestCase(GenericDocumentViewTestCase):
'metadata:metadata_add', args=(self.document.pk,), 'metadata:metadata_add', args=(self.document.pk,),
data={'metadata_type': self.metadata_type.pk}, follow=True data={'metadata_type': self.metadata_type.pk}, follow=True
) )
self.assertContains(response, 'successfully', status_code=200)
self.assertContains(response, 'Success', status_code=200)
self.assertEqual(len(self.document.metadata.all()), 1) self.assertEqual(len(self.document.metadata.all()), 1)