Skip to content

Commit

Permalink
add test based on quoting schema names
Browse files Browse the repository at this point in the history
  • Loading branch information
McKnight-42 committed Jun 7, 2024
1 parent 05eb347 commit 0a7c665
Showing 1 changed file with 25 additions and 0 deletions.
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"])

0 comments on commit 0a7c665

Please sign in to comment.