Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyisi authored and BenGalewsky committed Sep 21, 2024
1 parent a8ac6d6 commit 89c0e77
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ def test_put_fileset_complete(self, mocker, mock_find_dataset_by_id):
mock_lookup_pending = mocker.patch.object(TransformRequest,
"lookup_pending_on_dataset",
return_value=[pending_request])

lookup_request = TransformRequest()
lookup_request.status = TransformStatus.lookup
mock_lookup_running = mocker.patch.object(TransformRequest,
"lookup_running_by_dataset_id",
return_value=[lookup_request])
mock_processor = mocker.MagicMock(LookupResultProcessor)

client = self._test_client(lookup_result_processor=mock_processor)
Expand All @@ -76,8 +82,10 @@ def test_put_fileset_complete(self, mocker, mock_find_dataset_by_id):
assert dataset.size == 2046

mock_lookup_pending.assert_called_once_with(1234)
mock_lookup_running.assert_called_once_with(1234)
dataset.publish_files.assert_called_once_with(pending_request, mock_processor)
assert pending_request.status == TransformStatus.running
assert lookup_request.status == TransformStatus.running

def test_put_fileset_complete_empty_dataset(self, mocker, mock_find_dataset_by_id):
pending_request = TransformRequest()
Expand Down

0 comments on commit 89c0e77

Please sign in to comment.