Skip to content

Commit 7bc5896

Browse files
committed
Fix test that apparently only fails in Github runner?
1 parent c4d6ed6 commit 7bc5896

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/providers/gcp/internal/test_compute.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,11 @@ def testCreateDiskFromSnapshot(self, mock_gce_api, mock_block_operation):
212212
str(context.exception))
213213

214214
@typing.no_type_check
215+
@mock.patch('libcloudforensics.providers.gcp.internal.common.GoogleCloudComputeClient.GceApi')
215216
@mock.patch('libcloudforensics.providers.gcp.internal.common.ExecuteRequest')
216-
def testListSnapshots(self, mock_execute):
217+
def testListSnapshots(self, mock_execute, mock_gce_api):
217218
"""Test that snapshots of project are correctly listed."""
219+
mock_gce_api.return_value.snapshots.return_value = mock.Mock()
218220
mock_execute.return_value = [{'items': [{'name': 'fake-snapshot'}]}]
219221

220222
# Test without zone

0 commit comments

Comments
 (0)