Skip to content

Commit b058a37

Browse files
authored
Fix tests mocking with new version of envzy (#1155)
1 parent 378091d commit b058a37

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pylzy/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
envzy>=0.2.0
1+
envzy>=0.2.2
22
aioboto3>=9.6.0
33
appdirs>=1.4.4,<2.0.0
44
azure-storage-blob>=12.9.0,<13.0.0

pylzy/test_requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pandas==1.3.5
99
pure-protobuf==2.1.1
1010
sampleproject==3.0.0 # needed for test_classify_pypi_packages
1111
boto3
12-
aioboto3>=11.3.1
13-
aiobotocore[boto3]>=2.6.0
12+
aioboto3==11.3.1
13+
aiobotocore[boto3]==2.6.0 # aioboto3 and this dep must be bumped at once
1414
botocore
1515
# And packages for types:
1616
boto3-stubs[s3]

pylzy/tests/env/test_auto_python_env.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def test_get_modules_and_paths(
5959
# more of this test at explorer/test_classify.py, here
6060
# i'm testing just interface
6161

62-
def mock_check_distribution_at_pypi(self, pypi_index_url: str, name: str, version: str):
63-
return True
62+
def mock_find_distribution_at_pypi(self, name: str, version: str):
63+
return 'foo'
6464

6565
def mock_check_distribution_platform_at_pypi(
6666
self, pypi_index_url: str, name: str, version: str, target_python: PythonVersion
@@ -69,8 +69,8 @@ def mock_check_distribution_platform_at_pypi(
6969

7070
monkeypatch.setattr(
7171
envzy.classify.ModuleClassifier,
72-
'_check_distribution_at_pypi',
73-
mock_check_distribution_at_pypi,
72+
'_find_distribution_at_pypi',
73+
mock_find_distribution_at_pypi,
7474
)
7575

7676
monkeypatch.setattr(

0 commit comments

Comments
 (0)