-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test based on quoting schema names
- Loading branch information
1 parent
05eb347
commit 0a7c665
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
tests/functional/adapter/list_relations_tests/test_special_characters.py
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,25 @@ | ||
import pytest | ||
from dbt.tests.util import run_dbt | ||
|
||
|
||
TABLE_BASE_SQL = """ | ||
-- models/my_model.sql | ||
{{ config(schema = '1_contains_special*character$') }} | ||
select 1 as id | ||
""" | ||
|
||
|
||
class TestSpecialCharactersInSchema: | ||
|
||
@pytest.fixture(scope="class") | ||
def project_config_update(self): | ||
return {"quoting": {"schema": True, "identifier": True}} | ||
|
||
@pytest.fixture(scope="class") | ||
def models(self): | ||
return { | ||
"table.sql": TABLE_BASE_SQL, | ||
} | ||
|
||
def test_schema_with_special_chars(self, project): | ||
run_dbt(["run", "-s", "table"]) |