File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
unit_tests/source_declarative_manifest Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 99import yaml
1010
1111
12- def get_fixture_path (file_name ):
13- return Path (__file__ ).parent .parent / file_name
12+ def get_resource_path (file_name ) -> str :
13+ return Path (__file__ ).parent .parent / "resources" / file_name
1414
1515
1616@pytest .fixture
1717def valid_remote_config ():
18- return get_fixture_path ( "resources/ valid_remote_config.json" )
18+ return get_resource_path ( " valid_remote_config.json" )
1919
2020
2121@pytest .fixture
2222def invalid_remote_config ():
23- return get_fixture_path ( "resources/ invalid_remote_config.json" )
23+ return get_resource_path ( " invalid_remote_config.json" )
2424
2525
2626@pytest .fixture
2727def valid_local_manifest ():
28- return get_fixture_path ( "resources/ valid_local_manifest.yaml" )
28+ return get_resource_path ( " valid_local_manifest.yaml" )
2929
3030
3131@pytest .fixture
3232def invalid_local_manifest ():
33- return get_fixture_path ( "resources/ invalid_local_manifest.yaml" )
33+ return get_resource_path ( " invalid_local_manifest.yaml" )
3434
3535
3636@pytest .fixture
@@ -47,9 +47,9 @@ def invalid_local_manifest_yaml(invalid_local_manifest):
4747
4848@pytest .fixture
4949def valid_local_config_file ():
50- return get_fixture_path ( "resources/ valid_local_pokeapi_config.json" )
50+ return get_resource_path ( " valid_local_pokeapi_config.json" )
5151
5252
5353@pytest .fixture
5454def invalid_local_config_file ():
55- return get_fixture_path ( "resources/ invalid_local_pokeapi_config.json" )
55+ return get_resource_path ( " invalid_local_pokeapi_config.json" )
Original file line number Diff line number Diff line change 1313from tempfile import NamedTemporaryFile
1414from typing import Any
1515
16+ from dpath import get
1617import pytest
1718import yaml
1819from airbyte_protocol_dataclasses .models .airbyte_protocol import AirbyteCatalog
@@ -44,8 +45,8 @@ def sample_method(self) -> str:
4445"""
4546
4647
47- def get_fixture_path (file_name ) -> str :
48- return Path (__file__ ).parent .parent / file_name
48+ def get_resource_path (file_name ) -> str :
49+ return Path (__file__ ).parent .parent / "resources" / file_name
4950
5051
5152def test_components_module_from_string () -> None :
@@ -90,7 +91,7 @@ def get_py_components_config_dict(
9091 * ,
9192 failing_components : bool = False ,
9293) -> dict [str , Any ]:
93- connector_dir = Path (get_fixture_path ( "resources/ source_pokeapi_w_components_py" ))
94+ connector_dir = Path (get_resource_path ( " source_pokeapi_w_components_py" ))
9495 manifest_yml_path : Path = connector_dir / "manifest.yaml"
9596 custom_py_code_path : Path = connector_dir / (
9697 "components.py" if not failing_components else "components_failing.py"
You can’t perform that action at this time.
0 commit comments