Skip to content

Commit 272c843

Browse files
committed
fix test
1 parent 366b6cd commit 272c843

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/service-library/tests/test_utils_meta.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def test_app_name(
5252
is_correct_app_name: bool,
5353
):
5454

55-
mocker.patch(
56-
"servicelib.utils_meta.distribution",
57-
return_value=mocker.Mock(metadata={"Name": app_name, "Version": "1.0.0"}),
58-
)
55+
def mock_distribution(name):
56+
return mocker.Mock(metadata={"Name": app_name, "Version": "1.0.0"})
57+
58+
mocker.patch("servicelib.utils_meta.distribution", side_effect=mock_distribution)
5959
if is_valid_app_name:
6060
info = PackageInfo(package_name=package_name)
6161
if is_correct_app_name:

0 commit comments

Comments
 (0)