Skip to content

Commit

Permalink
attr -> use_profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Apr 18, 2019
1 parent 832f1db commit b00c824
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions test/integration/004_simple_archive_test/test_simple_archive.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from nose.plugins.attrib import attr
from test.integration.base import DBTIntegrationTest
from test.integration.base import DBTIntegrationTest, use_profile
import dbt.exceptions


Expand Down Expand Up @@ -58,7 +57,7 @@ def assert_case_tables_equal(self, actual, expected):
def assert_expected(self):
self.assert_case_tables_equal('archive_actual', 'archive_expected')

@attr(type='postgres')
@use_profile('postgres')
def test__postgres__simple_archive(self):
self.dbt_run_seed_archive()

Expand All @@ -72,7 +71,7 @@ def test__postgres__simple_archive(self):

self.assert_expected()

@attr(type='snowflake')
@use_profile('snowflake')
def test__snowflake__simple_archive(self):
self.dbt_run_seed_archive()

Expand All @@ -86,7 +85,7 @@ def test__snowflake__simple_archive(self):

self.assert_expected()

@attr(type='redshift')
@use_profile('redshift')
def test__redshift__simple_archive(self):
self.dbt_run_seed_archive()

Expand All @@ -100,7 +99,7 @@ def test__redshift__simple_archive(self):

self.assert_expected()

@attr(type='presto')
@use_profile('presto')
def test__presto__simple_archive_disabled(self):
results = self.run_dbt(["seed"])
self.assertEqual(len(results), self.NUM_ARCHIVE_MODELS)
Expand Down Expand Up @@ -142,7 +141,7 @@ def project_config(self):
def assert_expected(self):
self.assertTablesEqual('archive_actual', 'archive_expected')

@attr(type='bigquery')
@use_profile('bigquery')
def test__bigquery__simple_archive(self):
self.use_default_project()
self.use_profile('bigquery')
Expand All @@ -161,7 +160,7 @@ def test__bigquery__simple_archive(self):
self.assert_expected()


@attr(type='bigquery')
@use_profile('bigquery')
def test__bigquery__archive_with_new_field(self):
self.use_default_project()
self.use_profile('bigquery')
Expand Down Expand Up @@ -250,7 +249,7 @@ def project_config(self):
def run_archive(self):
return self.run_dbt(['archive'])

@attr(type='snowflake')
@use_profile('snowflake')
def test__snowflake__cross_archive(self):
self.run_sql_file("test/integration/004_simple_archive_test/seed.sql")

Expand All @@ -267,7 +266,7 @@ def test__snowflake__cross_archive(self):

self.assertTablesEqual("ARCHIVE_EXPECTED", "ARCHIVE_ACTUAL", table_b_db=self.alternative_database)

@attr(type='bigquery')
@use_profile('bigquery')
def test__bigquery__cross_archive(self):
self.run_sql_file("test/integration/004_simple_archive_test/seed_bq.sql")

Expand All @@ -291,7 +290,7 @@ def project_config(self):
"archive-paths": ['test/integration/004_simple_archive_test/test-archives-pg'],
}

@attr(type='postgres')
@use_profile('postgres')
def test__postgres_ref_archive(self):
self.dbt_run_seed_archive()
results = self.run_dbt(['run'])
Expand All @@ -315,7 +314,7 @@ def project_config(self):
'test/integration/004_simple_archive_test/test-archives-pg'],
}

@attr(type='postgres')
@use_profile('postgres')
def test__postgres__select_archives(self):
self.run_sql_file('test/integration/004_simple_archive_test/seed.sql')

Expand All @@ -336,7 +335,7 @@ def test__postgres__select_archives(self):
self.assertTablesEqual('archive_kelly', 'archive_kelly_expected')
self.assertTablesEqual('archive_actual', 'archive_expected')

@attr(type='postgres')
@use_profile('postgres')
def test__postgres_exclude_archives(self):
self.run_sql_file('test/integration/004_simple_archive_test/seed.sql')
results = self.run_dbt(['archive', '--exclude', 'archive_castillo'])
Expand All @@ -346,7 +345,7 @@ def test__postgres_exclude_archives(self):
self.assertTablesEqual('archive_kelly', 'archive_kelly_expected')
self.assertTablesEqual('archive_actual', 'archive_expected')

@attr(type='postgres')
@use_profile('postgres')
def test__postgres_select_archives(self):
self.run_sql_file('test/integration/004_simple_archive_test/seed.sql')
results = self.run_dbt(['archive', '--models', 'archive_castillo'])
Expand Down Expand Up @@ -395,7 +394,7 @@ def project_config(self):
"archive-paths": ['test/integration/004_simple_archive_test/test-archives-invalid'],
}

@attr(type='postgres')
@use_profile('postgres')
def test__postgres__invalid(self):
with self.assertRaises(dbt.exceptions.CompilationException) as exc:
self.run_dbt(['compile'], expect_pass=False)
Expand Down Expand Up @@ -451,7 +450,7 @@ def project_config(self):
"archive-paths": ['test/integration/004_simple_archive_test/test-check-col-archives-bq'],
}

@attr(type='bigquery')
@use_profile('bigquery')
def test__bigquery__archive_with_new_field(self):
self.use_default_project()
self.use_profile('bigquery')
Expand Down

0 comments on commit b00c824

Please sign in to comment.