Skip to content

Commit 02e7073

Browse files
committed
fix: fix tests
1 parent 34f8f01 commit 02e7073

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_app(self, MockApiClient):
5757
@patch("codecarbon.cli.main.Path.exists")
5858
@patch("codecarbon.cli.main.Confirm.ask")
5959
@patch("codecarbon.cli.main.questionary_prompt")
60-
@patch("codecarbon.cli.main._get_access_token")
60+
@patch("codecarbon.cli.main.get_access_token")
6161
@patch("typer.prompt")
6262
def test_config_no_local_new_all(
6363
self,
@@ -147,7 +147,7 @@ def side_effect_wrapper(*args, **kwargs):
147147
except OSError:
148148
pass
149149

150-
@patch("codecarbon.cli.main._get_access_token")
150+
@patch("codecarbon.cli.main.get_access_token")
151151
@patch("codecarbon.cli.main.Path.exists")
152152
@patch("codecarbon.cli.main.get_config")
153153
@patch("codecarbon.cli.main.questionary_prompt")

tests/test_cli_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_version_flag():
3232
def test_api_get_calls_api_and_prints(monkeypatch):
3333
runner = CliRunner()
3434
monkeypatch.setattr(cli_main, "ApiClient", FakeApiClient)
35-
monkeypatch.setattr(cli_main, "_get_access_token", fake_get_access_token)
35+
monkeypatch.setattr(cli_main, "get_access_token", fake_get_access_token)
3636

3737
result = runner.invoke(cli_main.codecarbon, ["test-api"])
3838
assert result.exit_code == 0

0 commit comments

Comments
 (0)