コード例 #1
0
ファイル: test_ingest_manager.py プロジェクト: jingpengw/boss
 def test_create_ingest_credentials(self):
     """"""
     ingest_mgmr = IngestManager()
     ingest_mgmr = IngestManager()
     ingest_mgmr.validate_config_file(self.example_config_data)
     ingest_mgmr.validate_properties()
     ingest_mgmr.owner = self.user.pk
     job = ingest_mgmr.create_ingest_job()
     ingest_mgmr.job = job
コード例 #2
0
ファイル: test_ingest_manager.py プロジェクト: ndrenkow/boss
 def test_generate_upload_tasks(self):
     """
     Test that the correct number of messages are being uploaded
     """
     ingest_mgmr = IngestManager()
     ingest_mgmr.validate_config_file(self.example_config_data)
     ingest_mgmr.validate_properties()
     ingest_mgmr.owner = self.user.pk
     job = ingest_mgmr.create_ingest_job()
     ingest_mgmr.job = job
     with patch.object(IngestManager, 'upload_task_file') as mock_method:
         ingest_mgmr.generate_upload_tasks(job.id)
         self.assertEquals(ingest_mgmr.file_index, 1)
         self.assertEquals(ingest_mgmr.num_of_chunks, 48)
         self.assertEquals(ingest_mgmr.count_of_tiles, 640)