Commit ebd5a705 authored by Priscila Manhaes's avatar Priscila Manhaes

modified for receiving base_document into _getMetadata

parent fde15f01
...@@ -42,12 +42,15 @@ class TestCase(unittest.TestCase): ...@@ -42,12 +42,15 @@ class TestCase(unittest.TestCase):
file_type = self._getFileType(output_data) file_type = self._getFileType(output_data)
self.assertEquals(file_type, destination_mimetype) self.assertEquals(file_type, destination_mimetype)
def _testGetMetadata(self, input_url, source_format, expected_metadata): def _testGetMetadata(self, input_url, source_format, expected_metadata,
base_document=False):
""" Generic tes for getting metadata file""" """ Generic tes for getting metadata file"""
metadata_dict = self.proxy.getFileMetadataItemList( metadata_dict = self.proxy.getFileMetadataItemList(
encodestring(open(input_url).read()), encodestring(open(input_url).read()),
source_format) source_format,
self.assertEquals(expected_metadata, metadata_dict) base_document)
for key,value in expected_metadata.iteritems():
self.assertEquals(metadata_dict[key], value)
def _testUpdateMetadata(self, input_url, source_format, metadata_dict, def _testUpdateMetadata(self, input_url, source_format, metadata_dict,
expected_metadata): expected_metadata):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment