Skip to content

Commit 7fdceed

Browse files
committed
test syntax
1 parent 3986e4d commit 7fdceed

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

tests/conftest.py

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,33 @@ def pytest_addoption(parser):
1313

1414

1515
@pytest.fixture(scope="class")
16-
def dbt_profile_target(request: FixtureRequest):
16+
def dbt_profile_target(request: FixtureRequest, dbt_profile_target_update):
1717
profile = request.config.getoption("--profile")
1818

1919
if profile == "ci_sql_server":
20-
return _profile_ci_sql_server()
21-
if profile == "ci_azure_cli":
22-
return _profile_ci_azure_cli()
23-
if profile == "ci_azure_auto":
24-
return _profile_ci_azure_auto()
25-
if profile == "ci_azure_environment":
26-
return _profile_ci_azure_environment()
27-
if profile == "ci_azure_basic":
28-
return _profile_ci_azure_basic()
29-
if profile == "user":
30-
return _profile_user()
31-
if profile == "user_azure":
32-
return _profile_user_azure()
33-
34-
raise ValueError(f"Unknown profile: {profile}")
20+
target = _profile_ci_sql_server()
21+
elif profile == "ci_azure_cli":
22+
target = _profile_ci_azure_cli()
23+
elif profile == "ci_azure_auto":
24+
target = _profile_ci_azure_auto()
25+
elif profile == "ci_azure_environment":
26+
target = _profile_ci_azure_environment()
27+
elif profile == "ci_azure_basic":
28+
target = _profile_ci_azure_basic()
29+
elif profile == "user":
30+
target = _profile_user()
31+
elif profile == "user_azure":
32+
target = _profile_user_azure()
33+
else:
34+
raise ValueError(f"Unknown profile: {profile}")
35+
36+
target.update(dbt_profile_target_update)
37+
return target
38+
39+
40+
@pytest.fixture(scope="class")
41+
def dbt_profile_target_update():
42+
return {}
3543

3644

3745
@pytest.fixture(scope="class")

tests/functional/adapter/test_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def models(self):
1616

1717
@staticmethod
1818
@pytest.fixture(scope="class")
19-
def profiles_config_update():
19+
def dbt_profile_target_update():
2020
return {"schema_authorization": "{{ env_var('DBT_TEST_USER_1') }}"}
2121

2222
@staticmethod

0 commit comments

Comments
 (0)