Skip to content

Commit 0edcb4e

Browse files
committed
Fix test
1 parent 07514d6 commit 0edcb4e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/climate-ref-core/tests/unit/test_providers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@ def test_run(self, mocker, tmp_path, provider, env_exists):
294294
):
295295
provider.run(["mock-command"])
296296
else:
297+
mocker.patch.object(
298+
climate_ref_core.providers.os.environ,
299+
"copy",
300+
return_value={"existing_var": "existing_value"},
301+
)
302+
provider.env_vars = {"test_var": "test_value"}
297303
provider.run(["mock-command"])
298304

299305
run.assert_called_with(
@@ -308,4 +314,5 @@ def test_run(self, mocker, tmp_path, provider, env_exists):
308314
stdout=subprocess.PIPE,
309315
stderr=subprocess.STDOUT,
310316
text=True,
317+
env={"existing_var": "existing_value", "test_var": "test_value"},
311318
)

0 commit comments

Comments
 (0)