From 1e0a38ed7a8623dac10ec75ad76933df7ca3dc82 Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Sat, 2 Oct 2021 15:41:33 +0200 Subject: [PATCH] Test rename dbt-labs/dbt#3880 --- tests/integration/base.py | 2 -- .../docs_generate_tests/test_docs_generate.py | 26 +++++++++---------- .../test_incremental_schema.py | 6 +---- .../test_snapshot_check_cols.py | 2 +- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/tests/integration/base.py b/tests/integration/base.py index 9c6d2d840..13dc8283d 100644 --- a/tests/integration/base.py +++ b/tests/integration/base.py @@ -58,9 +58,7 @@ def __eq__(self, other): class FakeArgs: def __init__(self): self.threads = 1 - self.data = False self.defer = False - self.schema = True self.full_refresh = False self.models = None self.select = None diff --git a/tests/integration/docs_generate_tests/test_docs_generate.py b/tests/integration/docs_generate_tests/test_docs_generate.py index 6b2ca44c3..6e0920571 100644 --- a/tests/integration/docs_generate_tests/test_docs_generate.py +++ b/tests/integration/docs_generate_tests/test_docs_generate.py @@ -888,7 +888,7 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False): }, 'test.test.not_null_model_id.d01cc630e6': { 'alias': 'not_null_model_id', - 'compiled_path': Normalized('target/compiled/test/models/schema.yml/schema_test/not_null_model_id.sql'), + 'compiled_path': Normalized('target/compiled/test/models/schema.yml/not_null_model_id.sql'), 'build_path': None, 'created_at': ANY, 'column_name': 'id', @@ -901,20 +901,20 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False): }, 'deferred': False, 'description': '', - 'fqn': ['test', 'schema_test', 'not_null_model_id'], + 'fqn': ['test', 'not_null_model_id'], 'name': 'not_null_model_id', 'original_file_path': model_schema_yml_path, 'package_name': 'test', 'patch_path': None, - 'path': Normalized('schema_test/not_null_model_id.sql'), - 'raw_sql': "{{ test_not_null(**_dbt_schema_test_kwargs) }}", + 'path': Normalized('not_null_model_id.sql'), + 'raw_sql': "{{ test_not_null(**_dbt_generic_test_kwargs) }}", 'refs': [['model']], 'relation_name': None, 'resource_type': 'test', 'root_path': self.test_root_realpath, 'schema': test_audit_schema, 'database': self.default_database, - 'tags': ['schema'], + 'tags': [], 'meta': {}, 'unique_id': 'test.test.not_null_model_id.d01cc630e6', 'docs': {'show': True}, @@ -979,7 +979,7 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False): }, 'test.test.test_nothing_model_.5d38568946': { 'alias': 'test_nothing_model_', - 'compiled_path': Normalized('target/compiled/test/models/schema.yml/schema_test/test_nothing_model_.sql'), + 'compiled_path': Normalized('target/compiled/test/models/schema.yml/test_nothing_model_.sql'), 'build_path': None, 'created_at': ANY, 'column_name': None, @@ -992,20 +992,20 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False): }, 'deferred': False, 'description': '', - 'fqn': ['test', 'schema_test', 'test_nothing_model_'], + 'fqn': ['test', 'test_nothing_model_'], 'name': 'test_nothing_model_', 'original_file_path': model_schema_yml_path, 'package_name': 'test', 'patch_path': None, - 'path': normalize('schema_test/test_nothing_model_.sql'), - 'raw_sql': "{{ test.test_nothing(**_dbt_schema_test_kwargs) }}", + 'path': normalize('test_nothing_model_.sql'), + 'raw_sql': "{{ test.test_nothing(**_dbt_generic_test_kwargs) }}", 'refs': [['model']], 'relation_name': None, 'resource_type': 'test', 'root_path': self.test_root_realpath, 'schema': test_audit_schema, 'database': self.default_database, - 'tags': ['schema'], + 'tags': [], 'meta': {}, 'unique_id': 'test.test.test_nothing_model_.5d38568946', 'docs': {'show': True}, @@ -1038,20 +1038,20 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False): }, 'deferred': False, 'description': '', - 'fqn': ['test', 'schema_test', 'unique_model_id'], + 'fqn': ['test', 'unique_model_id'], 'name': 'unique_model_id', 'original_file_path': model_schema_yml_path, 'package_name': 'test', 'patch_path': None, 'path': normalize('schema_test/unique_model_id.sql'), - 'raw_sql': "{{ test_unique(**_dbt_schema_test_kwargs) }}", + 'raw_sql': "{{ test_unique(**_dbt_generic_test_kwargs) }}", 'refs': [['model']], 'relation_name': None, 'resource_type': 'test', 'root_path': self.test_root_realpath, 'schema': test_audit_schema, 'database': self.default_database, - 'tags': ['schema'], + 'tags': [], 'meta': {}, 'unique_id': 'test.test.unique_model_id.67b76558ff', 'docs': {'show': True}, diff --git a/tests/integration/incremental_schema_tests/test_incremental_schema.py b/tests/integration/incremental_schema_tests/test_incremental_schema.py index 77391d625..cd4c86c40 100644 --- a/tests/integration/incremental_schema_tests/test_incremental_schema.py +++ b/tests/integration/incremental_schema_tests/test_incremental_schema.py @@ -32,7 +32,7 @@ def list_tests_and_assert(self, include, exclude, expected_tests): assert sorted(test_names) == sorted(expected_tests) def run_tests_and_assert( - self, include, exclude, expected_tests, compare_source, compare_target, schema = False, data = False + self, include, exclude, expected_tests, compare_source, compare_target ): run_args = ['run'] @@ -50,10 +50,6 @@ def run_tests_and_assert( test_args.extend(('--models', include)) if exclude: test_args.extend(('--exclude', exclude)) - if schema: - test_args.append('--schema') - if data: - test_args.append('--data') results = self.run_dbt(test_args) tests_run = [r.node.name for r in results] diff --git a/tests/integration/simple_snapshot_test/test_snapshot_check_cols.py b/tests/integration/simple_snapshot_test/test_snapshot_check_cols.py index fec868f7c..c1e9a2882 100644 --- a/tests/integration/simple_snapshot_test/test_snapshot_check_cols.py +++ b/tests/integration/simple_snapshot_test/test_snapshot_check_cols.py @@ -32,7 +32,7 @@ def snapshot_check_cols_cycle(self): self.assertEqual(len(results), 1) def assert_expected(self): - self.run_dbt(['test', '--data', '--vars', 'version: 3']) + self.run_dbt(['test', '--select', 'test_type:singular', '--vars', 'version: 3']) @use_profile('redshift') def test__redshift__simple_snapshot(self):