File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 99import pytest
1010from git import Repo
1111from pytest_httpx ._httpx_mock import HTTPXMock
12- from typer .testing import Any , CliRunner
12+ from typer .testing import CliRunner
1313
1414from infrahub_sdk .ctl .cli_commands import app
15-
16- from .utils import change_directory , strip_color
15+ from tests .helpers .utils import change_directory , strip_color
1716
1817runner = CliRunner ()
1918
2019
21- FIXTURE_BASE_DIR = Path (Path (os .path .abspath (__file__ )).parent / ".." / "fixtures" / "integration" / "test_infrahubctl" )
20+ FIXTURE_BASE_DIR = Path (
21+ Path (os .path .abspath (__file__ )).parent / ".." / ".." / "fixtures" / "integration" / "test_infrahubctl"
22+ )
2223
2324
24- def read_fixture (file_name : str , fixture_subdir : str = "." ) -> Any :
25+ def read_fixture (file_name : str , fixture_subdir : str = "." ) -> str :
2526 """Read the contents of a fixture."""
2627 with Path (FIXTURE_BASE_DIR / fixture_subdir / file_name ).open ("r" , encoding = "utf-8" ) as fhd :
2728 fixture_contents = fhd .read ()
@@ -38,7 +39,7 @@ def tags_transform_dir():
3839 shutil .copytree (fixture_path , temp_dir , dirs_exist_ok = True )
3940 # Initialize fixture as git repo. This is necessary to run some infrahubctl commands.
4041 with change_directory (temp_dir ):
41- Repo .init ("." )
42+ Repo .init ("." , initial_branch = "main" )
4243
4344 yield temp_dir
4445
You can’t perform that action at this time.
0 commit comments