Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Nov 1, 2022
1 parent df99c27 commit f6c1f09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/functional/run_operations/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@

model_sql = """
select 1 as id
"""
"""
17 changes: 9 additions & 8 deletions tests/functional/run_operations/test_run_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
model_sql
)


class TestOperations:
@pytest.fixture(scope="class")
def models(self):
return {"model.sql": model_sql}

@pytest.fixture(scope="class")
def macros(self):
return {
Expand Down Expand Up @@ -62,31 +63,31 @@ def run_operation(self, macro, expect_pass=True, extra_args=None, **kwargs):
if extra_args:
args.extend(extra_args)
return run_dbt(args, expect_pass=expect_pass)

def test_macro_noargs(self, project):
self.run_operation('no_args')
check_table_does_exist(project.adapter, 'no_args')

def test_macro_args(self, project):
self.run_operation('table_name_args', table_name='my_fancy_table')
check_table_does_exist(project.adapter, 'my_fancy_table')

def test_macro_exception(self, project):
self.run_operation('syntax_error', False)

def test_macro_missing(self, project):
self.run_operation('this_macro_does_not_exist', False)

def test_cannot_connect(self, project):
self.run_operation('no_args',
extra_args=['--target', 'noaccess'],
expect_pass=False)

def test_vacuum(self, project):
run_dbt(['run'])
# this should succeed
self.run_operation('vacuum', table_name='model')

def test_vacuum_ref(self, project):
run_dbt(['run'])
# this should succeed
Expand All @@ -100,4 +101,4 @@ def test_access_graph(self, project):

def test_print(self, project):
# Tests that calling the `print()` macro does not cause an exception
self.run_operation('print_something')
self.run_operation('print_something')

0 comments on commit f6c1f09

Please sign in to comment.