Fix tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user