Skip to content

Commit c9ee306

Browse files
author
Michael Smit
committed
Fix mocking to match the new package structure.
1 parent 757c4a9 commit c9ee306

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/country/test_uk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_uk_macro_single():
99
country="uk",
1010
)
1111

12-
#sim.calculate_single_economy()
12+
# sim.calculate_single_economy()
1313

1414

1515
def test_uk_macro_comparison():
@@ -23,7 +23,7 @@ def test_uk_macro_comparison():
2323
},
2424
)
2525

26-
#sim.calculate_economy_comparison()
26+
# sim.calculate_economy_comparison()
2727

2828

2929
def test_uk_macro_bad_package_versions_fail():

tests/fixtures/simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
@pytest.fixture
4646
def mock_get_default_dataset():
4747
with patch(
48-
"policyengine.simulation.get_default_dataset",
48+
"policyengine.simulation.simulation.get_default_dataset",
4949
return_value=SAMPLE_DATASET_FILE_ADDRESS,
5050
) as mock_get_default_dataset:
5151
yield mock_get_default_dataset
@@ -54,7 +54,7 @@ def mock_get_default_dataset():
5454
@pytest.fixture
5555
def mock_dataset():
5656
"""Simple Dataset mock fixture"""
57-
with patch("policyengine.simulation.Dataset") as mock_dataset_class:
57+
with patch("policyengine.simulation.simulation.Dataset") as mock_dataset_class:
5858
mock_instance = Mock()
5959
# Set file_path to mimic Dataset's behavior of clipping URI and bucket name from GCS paths
6060
mock_instance.from_file = Mock()

0 commit comments

Comments
 (0)