From 46e8aef248518b039cf698fba268b3dc3de93c5e Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Fri, 18 Aug 2023 21:48:32 -0400 Subject: [PATCH] revert to just reformatting changes --- .../test_materialized_view.py | 26 +++++++++++++------ tests/unit/test_relation.py | 19 -------------- 2 files changed, 18 insertions(+), 27 deletions(-) delete mode 100644 tests/unit/test_relation.py diff --git a/tests/functional/materializations/materialized_view_tests/test_materialized_view.py b/tests/functional/materializations/materialized_view_tests/test_materialized_view.py index 9d950356d0a..5f50afc994c 100644 --- a/tests/functional/materializations/materialized_view_tests/test_materialized_view.py +++ b/tests/functional/materializations/materialized_view_tests/test_materialized_view.py @@ -56,20 +56,30 @@ def query_row_count(project, relation: BaseRelation) -> int: def query_relation_type(project, relation: BaseRelation) -> Optional[str]: return query_relation_type(project, relation) - @pytest.mark.skip("") - def test_materialized_view_replaces_table(self, project, my_table): - super().test_materialized_view_replaces_table(project, my_table) - - @pytest.mark.skip("") - def test_materialized_view_replaces_view(self, project, my_view): - super().test_materialized_view_replaces_view(project, my_view) - + @pytest.mark.skip( + "The current implementation does not support overwriting materialized views with tables." + ) def test_table_replaces_materialized_view(self, project, my_materialized_view): super().test_table_replaces_materialized_view(project, my_materialized_view) + @pytest.mark.skip( + "The current implementation does not support overwriting materialized views with views." + ) def test_view_replaces_materialized_view(self, project, my_materialized_view): super().test_view_replaces_materialized_view(project, my_materialized_view) + @pytest.mark.skip( + "The current implementation does not support overwriting tables with materialized views." + ) + def test_materialized_view_replaces_table(self, project, my_table): + super().test_materialized_view_replaces_table(project, my_table) + + @pytest.mark.skip( + "The current implementation does not support overwriting views with materialized views." + ) + def test_materialized_view_replaces_view(self, project, my_view): + super().test_materialized_view_replaces_view(project, my_view) + class PostgresMaterializedViewChanges(MaterializedViewChanges): @pytest.fixture(scope="class", autouse=True) diff --git a/tests/unit/test_relation.py b/tests/unit/test_relation.py deleted file mode 100644 index 3e0ebf7fac8..00000000000 --- a/tests/unit/test_relation.py +++ /dev/null @@ -1,19 +0,0 @@ -from dataclasses import replace - -import pytest - -from dbt.adapters.base import BaseRelation -from dbt.contracts.relation import RelationType - - -@pytest.mark.parametrize( - "relation_type,result", - [ - (RelationType.View, True), - (RelationType.Table, False), - ], -) -def test_can_be_renamed(relation_type, result): - my_relation = BaseRelation.create(type=relation_type) - my_relation = replace(my_relation, relations_that_can_be_renamed=[RelationType.View]) - assert my_relation.can_be_renamed is result