Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed Oct 2, 2021
1 parent 9686843 commit 1e0a38e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
2 changes: 0 additions & 2 deletions tests/integration/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions tests/integration/docs_generate_tests/test_docs_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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},
Expand Down Expand Up @@ -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,
Expand All @@ -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},
Expand Down Expand Up @@ -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},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 1e0a38e

Please sign in to comment.