-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added functional test for quota project
- Loading branch information
1 parent
f9646a7
commit 3ab27f8
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from dbt.tests.util import run_dbt | ||
|
||
_QUOTA_PROJECT = os.getenv("BIGQUERY_TEST_ALT_DATABASE") | ||
|
||
|
||
class TestNoQuotaProject: | ||
def test_no_quota_project(self, project): | ||
results = run_dbt() | ||
for result in results: | ||
assert None == result.adapter_response["quota_project"] | ||
|
||
|
||
class TestQuotaProjectOption: | ||
@pytest.fixture(scope="class") | ||
def profiles_config_update(self, dbt_profile_target): | ||
outputs = {"default": dbt_profile_target} | ||
outputs["default"]["quota_project"] = _QUOTA_PROJECT | ||
yield | ||
|
||
def test_quota_project_option(self, project): | ||
results = run_dbt() | ||
for result in results: | ||
assert _QUOTA_PROJECT == result.adapter_response["quota_project"] |