diff --git a/tools/azure-devtools/src/azure_devtools/scenario_tests/patches.py b/tools/azure-devtools/src/azure_devtools/scenario_tests/patches.py index 74c27927c29c..ba3d95c7d35a 100644 --- a/tools/azure-devtools/src/azure_devtools/scenario_tests/patches.py +++ b/tools/azure-devtools/src/azure_devtools/scenario_tests/patches.py @@ -34,4 +34,4 @@ def mock_in_unit_test(unit_test, target, replacement): mp = mock.patch(target, replacement) mp.__enter__() - unit_test.addCleanup(mp.__exit__) + unit_test.addCleanup(mp.__exit__, None, None, None)