Commit bae5c56d authored by Roque Porchetto's avatar Roque Porchetto

erp5_wendelin_telecom_ingestion: removing logs in unit tests

parent a6a9bbf7
......@@ -376,7 +376,6 @@ class TestDataIngestion(SecurityTestCase):
self.checkDataObjects(ingestion_reference, data_chunk, None, json_data)
new_data_chunk = ''.join([random.choice(string.ascii_letters + string.digits) for _ in xrange(self.CHUNK_SIZE_TXT + 1000)])
new_json_data = json.dumps({"File content sample: ": new_data_chunk[:self.CHUNK_SIZE_TXT]})
log("Reingesting existing reference")
ingestion_reference = self.ingest(new_data_chunk, reference, self.TXT)
self.checkDataObjects(ingestion_reference, new_data_chunk, None, new_json_data)
......@@ -398,10 +397,21 @@ class TestDataIngestion(SecurityTestCase):
json_data = json.dumps({"File content sample: ": data_chunk[:self.CHUNK_SIZE_TXT]})
self.checkDataObjects(ingestion_reference, data_chunk, None, json_data)
script_content = self.portal.getDescriptorHTMLContent(ingestion_reference)
log("script_content:")
log(script_content)
self.assertEqual(script_content, json_data)
'''
def test_data_stream_invalidation(self):
reference = self.getRandomReference()
data_chunk = ''.join([random.choice(string.ascii_letters + string.digits) for _ in xrange(self.CHUNK_SIZE_TXT + 1000)])
ingestion_reference = self.ingest(data_chunk, reference, self.TXT)
json_data = json.dumps({"File content sample: ": data_chunk[:self.CHUNK_SIZE_TXT]})
self.checkDataObjects(ingestion_reference, data_chunk, None, json_data)
#self.portal.data_stream_module.invalidateObject(data_stream.getId())
self.tic()
invalid_reference = ingestion_reference + self.INVALID
self.checkOperation(ingestion_reference, invalid_reference, data_chunk, None, json_data)
'''
# TODOs
#def test_object_invalidation(self):
......
......@@ -57,6 +57,7 @@
<string>W:344, 4: Unused variable \'ingestion_id\' (unused-variable)</string>
<string>W: 8, 0: Unused timedelta imported from datetime (unused-import)</string>
<string>W: 10, 0: Unused import math (unused-import)</string>
<string>W: 13, 0: Unused log imported from Products.ERP5Type.Log (unused-import)</string>
<string>W: 14, 0: Unused import hashlib (unused-import)</string>
</tuple>
</value>
......
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