Commit ab6250a1 authored by Ivan Tyagov's avatar Ivan Tyagov

Clean up.

parent 47712107
......@@ -3,7 +3,6 @@ import string
import random
import csv
import os
import time
import numpy as np
import base64
......@@ -31,7 +30,6 @@ class TestDataIngestion(SecurityTestCase):
self.assertEqual(self.INVALID, self.portal.getIngestionReferenceDictionary()["invalid_suffix"])
self.assertEqual(self.EOF, self.REFERENCE_SEPARATOR + self.portal.getIngestionReferenceDictionary()["split_end_suffix"])
self.assertEqual(self.PART_1, self.REFERENCE_SEPARATOR + self.portal.getIngestionReferenceDictionary()["split_first_suffix"])
# XXX: create default users
def getRandomReference(self):
random_string = ''.join([random.choice(string.ascii_letters + string.digits) for _ in xrange(10)])
......@@ -76,7 +74,6 @@ class TestDataIngestion(SecurityTestCase):
request.set('data_chunk', encoded_data_chunk)
ingestion_policy.ingest()
self.tic()
return
def ingest(self, data_chunk, reference, extension, eof):
ingestion_reference = self.getIngestionReference(reference, extension)
......@@ -85,7 +82,7 @@ class TestDataIngestion(SecurityTestCase):
ingestion_policy = self.portal.portal_ingestion_policies.wendelin_embulk
self.ingestRequest(ingestion_reference, eof, data_chunk, ingestion_policy)
ingestion_id, ingestion_reference = self.sanitizeReference(ingestion_reference)
_, ingestion_reference = self.sanitizeReference(ingestion_reference)
return ingestion_reference
......@@ -151,19 +148,15 @@ class TestDataIngestion(SecurityTestCase):
reference = self.getRandomReference()
ingestion_reference = self.ingest(data_chunk_1, reference, self.FIF, self.PART_1)
time.sleep(1)
self.tic()
ingestion_reference = self.ingest(data_chunk_2, reference, self.FIF, self.PART_2)
time.sleep(1)
self.tic()
ingestion_reference = self.ingest(data_chunk_3, reference, self.FIF, self.PART_3)
time.sleep(1)
self.tic()
ingestion_reference = self.ingest(data_chunk_4, reference, self.FIF, self.EOF)
time.sleep(1)
self.tic()
# call explicitly alarm so all 4 Data Streams can be concatenated to one
......
......@@ -46,9 +46,8 @@
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 88, 4: Unused variable \'ingestion_id\' (unused-variable)</string>
<string>W: 95, 34: Unused variable \'i\' (unused-variable)</string>
<string>W: 95, 76: Unused variable \'j\' (unused-variable)</string>
<string>W: 92, 34: Unused variable \'i\' (unused-variable)</string>
<string>W: 92, 76: Unused variable \'j\' (unused-variable)</string>
</tuple>
</value>
</item>
......
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