Skip to content

Commit

Permalink
Flake
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf committed Jun 4, 2024
1 parent c2ec0ce commit 76221bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions panoptes_aggregation/batch_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def run_aggregation(project_id, workflow_id, user_id):
# STDOUT messages get printed to kubernetes logs
print(f'Batch Aggregation: Run successful for workflow {workflow_id} by user {user_id}')


class BatchAggregator:
"""
Bunch of stuff to manage a batch aggregation run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_run_aggregation_permission_failure(self, mock_aggregator):
mock_aggregator_instance = mock_aggregator.return_value
mock_aggregator_instance.check_permission.return_value = False

with self.assertRaises(SystemExit) as leaver:
with self.assertRaises(SystemExit):
run_aggregation(1, 10, 100)
mock_aggregator_instance.update_panoptes.assert_not_called()

Expand Down Expand Up @@ -135,7 +135,7 @@ def test_update_panoptes_success(self, mock_get, mock_put):
body = {'uuid': ba.id, 'status': 'completed'}
ba.update_panoptes(body)
mock_get.assert_called_with('/aggregations', params={'workflow_id': 10})
mock_put.assert_called_with('/aggregations/5555', etag='thisisanetag', json={'aggregations': body })
mock_put.assert_called_with('/aggregations/5555', etag='thisisanetag', json={'aggregations': body})

@patch("panoptes_aggregation.batch_aggregation.Panoptes.put")
@patch("panoptes_aggregation.batch_aggregation.Panoptes.get")
Expand All @@ -145,7 +145,7 @@ def test_update_panoptes_failure(self, mock_get, mock_put):
body = {'status': 'failure'}
ba.update_panoptes(body)
mock_get.assert_called_with('/aggregations', params={'workflow_id': 10})
mock_put.assert_called_with('/aggregations/5555', etag='thisisanetag', json={'aggregations': body })
mock_put.assert_called_with('/aggregations/5555', etag='thisisanetag', json={'aggregations': body})

@patch("panoptes_aggregation.batch_aggregation.BlobServiceClient")
def test_connect_blob_storage(self, mock_client):
Expand Down

0 comments on commit 76221bd

Please sign in to comment.