def setUp(self): django.setup() from batch.test import utils as batch_test_utils from product.test import utils as product_test_utils self.country = storage_test_utils.create_country() self.src_file = source_test_utils.create_source() self.job_type1 = job_test_utils.create_job_type(name='test1', category='test-1', is_operational=True) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.product1 = product_test_utils.create_product(job_exe=self.job_exe1, has_been_published=True, is_published=True, file_name='test.txt', countries=[self.country]) product_test_utils.create_file_link(ancestor=self.src_file, descendant=self.product1, job=self.job1, job_exe=self.job_exe1) self.batch = batch_test_utils.create_batch() self.job_type2 = job_test_utils.create_job_type(name='test2', category='test-2', is_operational=False) self.job2 = job_test_utils.create_job(job_type=self.job_type2) self.job_exe2 = job_test_utils.create_job_exe(job=self.job2) self.product2a = product_test_utils.create_product(job_exe=self.job_exe2, has_been_published=True, is_published=False, countries=[self.country]) product_test_utils.create_file_link(ancestor=self.src_file, descendant=self.product2a, job=self.job2, job_exe=self.job_exe2, batch=self.batch) self.product2b = product_test_utils.create_product(job_exe=self.job_exe2, has_been_published=True, is_published=True, is_superseded=True, countries=[self.country]) product_test_utils.create_file_link(ancestor=self.src_file, descendant=self.product2b, job=self.job2, job_exe=self.job_exe2, batch=self.batch) self.product2c = product_test_utils.create_product(job_exe=self.job_exe2, has_been_published=True, is_published=True, countries=[self.country]) product_test_utils.create_file_link(ancestor=self.src_file, descendant=self.product2c, job=self.job2, job_exe=self.job_exe2, batch=self.batch)
def setUp(self): django.setup() from product.test import utils as product_test_utils self.country = storage_test_utils.create_country() self.job_type1 = job_test_utils.create_job_type(name='test1', category='test-1', is_operational=True) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.src_file = source_test_utils.create_source( data_started='2016-01-01T00:00:00Z', data_ended='2016-01-01T00:00:00Z', file_name='test.txt', is_parsed=True) self.product1 = product_test_utils.create_product( job_exe=self.job_exe1, has_been_published=True, is_published=True, file_name='test_prod.txt', countries=[self.country]) product_test_utils.create_file_link(ancestor=self.src_file, descendant=self.product1, job=self.job1, job_exe=self.job_exe1)
def setUp(self): django.setup() self.country = storage_test_utils.create_country() self.job_type1 = job_test_utils.create_job_type(name='test1', category='test-1', is_operational=True) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.product1 = product_test_utils.create_product(job_exe=self.job_exe1, has_been_published=True, file_name='test.txt', countries=[self.country]) self.job_type2 = job_test_utils.create_job_type(name='test2', category='test-2', is_operational=False) self.job2 = job_test_utils.create_job(job_type=self.job_type2) self.job_exe2 = job_test_utils.create_job_exe(job=self.job2) self.product2 = product_test_utils.create_product(job_exe=self.job_exe2, has_been_published=True, countries=[self.country])
def setUp(self): django.setup() self.country = storage_test_utils.create_country() self.job_type1 = job_test_utils.create_job_type(name='test1', category='test-1', is_operational=True) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.file1 = storage_test_utils.create_file(job_exe=self.job_exe1, job_output='out_name', file_name='test.txt', countries=[self.country], recipe_node='test-recipe-node') self.job_type2 = job_test_utils.create_job_type(name='test2', category='test-2', is_operational=False) self.job2 = job_test_utils.create_job(job_type=self.job_type2) self.job_exe2 = job_test_utils.create_job_exe(job=self.job2) self.file2 = storage_test_utils.create_file(job_exe=self.job_exe2, countries=[self.country])
def setUp(self): django.setup() self.workspace1 = storage_test_utils.create_workspace(name='ws1') self.country = storage_test_utils.create_country() manifest = copy.deepcopy(job_test_utils.COMPLETE_MANIFEST) manifest['job']['name'] = 'test1' self.job_type1 = job_test_utils.create_seed_job_type(manifest=manifest) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.recipe_type1 = recipe_test_utils.create_recipe_type_v6() self.recipe1 = recipe_test_utils.create_recipe( recipe_type=self.recipe_type1) self.batch1 = batch_test_utils.create_batch( recipe_type=self.recipe_type1, is_creation_done=True) self.file = storage_test_utils.create_file( file_name='test.txt', file_type='SOURCE', media_type='image/png', file_size=1000, data_type_tags=['png'], file_path='/test/path', workspace=self.workspace1, is_deleted=False, last_modified='', data_started='2017-01-01T00:00:00Z', data_ended='2017-01-01T00:00:00Z', source_started='2017-01-01T00:00:00Z', source_ended='2017-01-01T00:00:00Z', geometry='', center_point='', meta_data='', countries=[self.country], job_exe=self.job_exe1, job_output='output_name_1', recipe=self.recipe1, recipe_node='my-recipe', batch=self.batch1, is_superseded=True, superseded='2017-01-01T00:00:00Z') rest.login_client(self.client)
def setUp(self): django.setup() self.country = storage_test_utils.create_country() manifest = copy.deepcopy(job_test_utils.COMPLETE_MANIFEST) manifest['job']['name'] = 'test1' self.job_type1 = job_test_utils.create_seed_job_type(manifest=manifest) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.f1_source_started = dt.datetime(2016, 1, 1, tzinfo=utc) self.f1_source_ended = dt.datetime(2016, 1, 2, tzinfo=utc) self.source_sensor_class = 'classA' self.source_sensor = '1' self.source_collection = '12345' self.source_task = 'test-task' self.file1 = storage_test_utils.create_file( job_exe=self.job_exe1, job_output='out_name', file_name='test.txt', countries=[self.country], recipe_node='test-recipe-node', source_started=self.f1_source_started, source_ended=self.f1_source_ended, source_sensor_class=self.source_sensor_class, source_sensor=self.source_sensor, source_collection=self.source_collection, source_task=self.source_task, data_type_tags=['type1', 'type2']) manifest['job']['name'] = 'test2' self.job_type2 = job_test_utils.create_seed_job_type(manifest=manifest) self.job2 = job_test_utils.create_job(job_type=self.job_type2) self.job_exe2 = job_test_utils.create_job_exe(job=self.job2) self.f2_source_started = dt.datetime(2016, 1, 2, tzinfo=utc) self.f2_source_ended = dt.datetime(2016, 1, 3, tzinfo=utc) self.file2 = storage_test_utils.create_file( job_exe=self.job_exe2, countries=[self.country], source_started=self.f2_source_started, source_ended=self.f2_source_ended) rest.login_client(self.client)
def setUp(self): django.setup() self.workspace1 = storage_test_utils.create_workspace(name='ws1') self.country = storage_test_utils.create_country() self.job_type1 = job_test_utils.create_job_type(name='test1', category='test-1', is_operational=True) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.recipe_type1 = recipe_test_utils.create_recipe_type() self.recipe1 = recipe_test_utils.create_recipe(recipe_type=self.recipe_type1) self.batch1 = batch_test_utils.create_batch(recipe_type=self.recipe_type1, is_creation_done=True) self.file = storage_test_utils.create_file( file_name='test.txt', file_type='SOURCE', media_type='image/png', file_size=1000, data_type='png', file_path='/test/path', workspace=self.workspace1, is_deleted=False, last_modified='', data_started='2017-01-01T00:00:00Z', data_ended='2017-01-01T00:00:00Z', source_started='2017-01-01T00:00:00Z', source_ended='2017-01-01T00:00:00Z', geometry='', center_point='', meta_data='', countries=[self.country], job_exe=self.job_exe1, job_output='output_name_1', recipe=self.recipe1, recipe_node='my-recipe', batch=self.batch1, is_superseded=True, superseded='2017-01-01T00:00:00Z')
def setUp(self): django.setup() self.country = storage_test_utils.create_country() self.job_type1 = job_test_utils.create_job_type(name='test1', category='test-1', is_operational=True) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.product1 = product_test_utils.create_product(job_exe=self.job_exe1, has_been_published=True, is_published=True, file_name='test.txt', countries=[self.country]) self.job_type2 = job_test_utils.create_job_type(name='test2', category='test-2', is_operational=False) self.job2 = job_test_utils.create_job(job_type=self.job_type2) self.job_exe2 = job_test_utils.create_job_exe(job=self.job2) self.product2a = product_test_utils.create_product(job_exe=self.job_exe2, has_been_published=True, is_published=False, countries=[self.country]) self.product2b = product_test_utils.create_product(job_exe=self.job_exe2, has_been_published=True, is_published=True, is_superseded=True, countries=[self.country]) self.product2c = product_test_utils.create_product(job_exe=self.job_exe2, has_been_published=True, is_published=True, countries=[self.country])
def setUp(self): django.setup() self.country = storage_test_utils.create_country() self.job_type1 = job_test_utils.create_job_type(name='test1', category='test-1', is_operational=True) self.job1 = job_test_utils.create_job(job_type=self.job_type1) self.job_exe1 = job_test_utils.create_job_exe(job=self.job1) self.f1_source_started = dt.datetime(2016, 1, 1, tzinfo=utc) self.f1_source_ended = dt.datetime(2016, 1, 2, tzinfo=utc) self.source_sensor_class = 'classA' self.source_sensor = '1' self.source_collection = '12345' self.source_task = 'test-task' self.file1 = storage_test_utils.create_file( job_exe=self.job_exe1, job_output='out_name', file_name='test.txt', countries=[self.country], recipe_node='test-recipe-node', source_started=self.f1_source_started, source_ended=self.f1_source_ended, source_sensor_class=self.source_sensor_class, source_sensor=self.source_sensor, source_collection=self.source_collection, source_task=self.source_task) self.job_type2 = job_test_utils.create_job_type(name='test2', category='test-2', is_operational=False) self.job2 = job_test_utils.create_job(job_type=self.job_type2) self.job_exe2 = job_test_utils.create_job_exe(job=self.job2) self.f2_source_started = dt.datetime(2016, 1, 2, tzinfo=utc) self.f2_source_ended = dt.datetime(2016, 1, 3, tzinfo=utc) self.file2 = storage_test_utils.create_file( job_exe=self.job_exe2, countries=[self.country], source_started=self.f2_source_started, source_ended=self.f2_source_ended)
def setUp(self): django.setup() self.country = storage_test_utils.create_country() self.source = source_test_utils.create_source(countries=[self.country])