Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf committed Jul 1, 2024
1 parent 5f15610 commit c4e4532
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def test_run_aggregation_success(self, mock_aggregator, mock_wf_ext_conf):
mock_aggregator_instance.upload_files.assert_called_once()
mock_aggregator_instance.update_panoptes.assert_called_once()

@patch("panoptes_aggregation.batch_aggregation.os.mkdir")
@patch("panoptes_aggregation.batch_aggregation.os.makedirs")
@patch("panoptes_aggregation.batch_aggregation.Workflow")
@patch("panoptes_aggregation.batch_aggregation.Project")
def test_save_exports(self, mock_project, mock_workflow, mock_mkdir):
def test_save_exports(self, mock_project, mock_workflow, mock_makedirs):
# Test that Panoptes calls are made and files are saved
csv_dict = {'media': [{'src': 'http://zooniverse.org/123.csv'}]}
mock_project.return_value.describe_export.return_value = csv_dict
Expand All @@ -60,7 +60,7 @@ def test_save_exports(self, mock_project, mock_workflow, mock_mkdir):

assert ba.id is not None
self.assertEqual(response, expected_response)
mock_mkdir.assert_called_once()
mock_makedirs.assert_called_once()
mock_project.assert_called_once_with(1)
mock_workflow.assert_called_once_with(10)
mock_project.return_value.describe_export.assert_called_once_with('workflows')
Expand Down Expand Up @@ -164,4 +164,4 @@ def test_update_panoptes_get_failure(self, mock_get, mock_put):
def test_connect_blob_storage(self, mock_client):
ba = batch_agg.BatchAggregator(1, 10, 100)
ba.connect_blob_storage()
ba.blob_service_client.create_container.assert_called_once_with(name=ba.id)
ba.blob_service_client.create_container.assert_called_once_with(name=ba.id, public_access='container')

0 comments on commit c4e4532

Please sign in to comment.