Skip to content

Commit

Permalink
Updating tests to match assertions and removing dbt-clone due to no s…
Browse files Browse the repository at this point in the history
…upport
  • Loading branch information
prdpsvs committed May 24, 2024
1 parent 709d648 commit 1c6eba1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 251 deletions.
27 changes: 16 additions & 11 deletions tests/functional/adapter/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,29 +648,34 @@ def models(self):
@pytest.fixture(scope="class")
def expected_sql(self):
return """
if object_id <model_identifier> is not null begin drop view <model_identifier> end
if object_id <model_identifier> is not null begin drop table <model_identifier> end
exec(\'create view <model_identifier> as select \'\'blue\'\' as "from",1 as id,\'\'2019-01-01\'\' as date_day;\');
create table <model_identifier>([id] int not null,[from] varchar(100)not null,[date_day] varchar(100))
with(distribution = round_robin,heap)
insert into <model_identifier>([id],[from],[date_day])
select [id],[from],[date_day] from <model_identifier>
if object_id <model_identifier> is not null begin drop view <model_identifier> end
exec(\'create view <model_identifier> as select \'\'blue\'\' as "from",1 as id,\'\'2019-01-01\'\' as date_day;\'); create table <model_identifier>([id] int not null,[from] varchar(100)not null,[date_day] varchar(100))with(distribution = round_robin,heap)insert into <model_identifier>([id],[from],[date_day])select [id],[from],[date_day] from <model_identifier>
"""


class TestTableConstraintsRuntimeDdlEnforcementSynapse(BaseConstraintsRuntimeDdlEnforcement):
pass
@pytest.fixture(scope="class")
def expected_sql(self):
return """
exec('create view <model_identifier> as -- depends_on: <foreign_key_model_identifier> select ''blue'' as color,1 as id,''2019-01-01'' as date_day;'); create table <model_identifier>([id] int not null,[color] varchar(100),[date_day] varchar(100))with(distribution = round_robin,heap)insert into <model_identifier>([id],[color],[date_day])select [id],[color],[date_day] from <model_identifier>
"""


class TestIncrementalConstraintsRuntimeDdlEnforcementSynapse(
BaseIncrementalConstraintsRuntimeDdlEnforcement
):
pass
@pytest.fixture(scope="class")
def expected_sql(self):
return """
exec('create view <model_identifier> as -- depends_on: <foreign_key_model_identifier> select ''blue'' as color,1 as id,''2019-01-01'' as date_day;'); create table <model_identifier>([id] int not null,[color] varchar(100),[date_day] varchar(100))with(distribution = round_robin,heap)insert into <model_identifier>([id],[color],[date_day])select [id],[color],[date_day] from <model_identifier>
"""


class TestModelConstraintsRuntimeEnforcementSynapse(BaseModelConstraintsRuntimeEnforcement):
pass
@pytest.fixture(scope="class")
def expected_sql(self):
return """
exec('create view <model_identifier> as -- depends_on: <foreign_key_model_identifier> select ''blue'' as color,1 as id,''2019-01-01'' as date_day;'); create table <model_identifier>([id] int not null,[color] varchar(100),[date_day] varchar(100))with(distribution = round_robin,heap)insert into <model_identifier>([id],[color],[date_day])select [id],[color],[date_day] from <model_identifier>
"""


class TestTableConstraintsColumnsEqualSynapse(BaseTableConstraintsColumnsEqual):
Expand Down
238 changes: 0 additions & 238 deletions tests/functional/adapter/test_dbt_clone.py

This file was deleted.

3 changes: 1 addition & 2 deletions tests/functional/adapter/test_query_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ class TestMacroQueryCommentsSynapse(BaseMacroQueryComments):


class TestMacroArgsQueryCommentsSynapse(BaseMacroArgsQueryComments):
def test_matches_comment(self, project) -> bool:
def test_matches_comment(self, project):
logs = self.run_get_json()
expected_dct = {
"app": "dbt++",
"dbt_version": dbt_version,
"macro_version": "0.1.0",
"message": f"blah: {project.adapter.config.target_name}",
}
Expand Down

0 comments on commit 1c6eba1

Please sign in to comment.