Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Asserting that the mock is called
Browse files Browse the repository at this point in the history
Mocks are matched by function name string which is very fragile. If the function gets renamed
this will fail prompting the renamer to fix the test.
  • Loading branch information
Tim Regan committed Jul 6, 2021
1 parent f4d221e commit 779e2d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Tests/ML/test_lightning_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,4 @@ def mocked_convert_channels_to_file_paths(
with mock.patch("InnerEye.ML.lightning_base.convert_channels_to_file_paths") as convert_channels_to_file_paths_mock:
convert_channels_to_file_paths_mock.side_effect = mocked_convert_channels_to_file_paths
container.setup()
convert_channels_to_file_paths_mock.assert_called()

0 comments on commit 779e2d4

Please sign in to comment.