Skip to content

Commit

Permalink
RM-96 fix prep
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantimjohn committed Jul 17, 2023
1 parent 51f069a commit 8425fdc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/unit/records/test_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def setUp(self):
def test_prep_table_exists_append_implicit(self, mock_quote_schema_and_table):
mock_schema_sql = Mock(name='schema_sql')
mock_driver = Mock(name='driver', spec=DBDriver)
mock_driver.db = Mock(name='db')
mock_driver.db_conn = Mock(name='db')
mock_driver.db_engine = Mock(name='db_endine')

mock_driver.has_table.return_value = True
how_to_prep = ExistingTableHandling.APPEND
Expand All @@ -26,7 +27,8 @@ def test_prep_table_exists_append_implicit(self, mock_quote_schema_and_table):
def test_prep_table_exists_truncate_implicit(self, mock_quote_schema_and_table):
mock_schema_sql = Mock(name='schema_sql')
mock_driver = Mock(name='driver', spec=DBDriver)
mock_driver.db = Mock(name='db')
mock_driver.db_conn = Mock(name='db')
mock_driver.db_engine = Mock(name='db_endine')

mock_quote_schema_and_table
mock_driver.has_table.return_value = True
Expand All @@ -45,7 +47,8 @@ def test_prep_table_exists_truncate_implicit(self, mock_quote_schema_and_table):
def test_prep_table_exists_delete_implicit(self, mock_quote_schema_and_table):
mock_schema_sql = Mock(name='schema_sql')
mock_driver = Mock(name='driver', spec=DBDriver)
mock_driver.db = Mock(name='db')
mock_driver.db_conn = Mock(name='db')
mock_driver.db_engine = Mock(name='db_endine')

mock_quote_schema_and_table
mock_driver.has_table.return_value = True
Expand All @@ -65,7 +68,7 @@ def test_prep_table_exists_drop_implicit(self, mock_quote_schema_and_table):
mock_schema_sql = Mock(name='schema_sql')
mock_driver = Mock(name='driver', spec=DBDriver)
mock_db = MagicMock(name='db')
mock_driver.db = mock_db
mock_driver.db_conn = mock_db

mock_quote_schema_and_table
mock_driver.has_table.return_value = True
Expand Down Expand Up @@ -99,7 +102,7 @@ def test_prep_table_not_exists(self, mock_quote_schema_and_table):
mock_schema_sql = Mock(name='schema_sql')
mock_driver = Mock(name='driver', spec=DBDriver)
mock_db = MagicMock(name='db')
mock_driver.db = mock_db
mock_driver.db_conn = mock_db

mock_quote_schema_and_table
mock_driver.has_table.return_value = False
Expand Down Expand Up @@ -128,7 +131,7 @@ def test_prep_table_exists_drop_explicit(self, mock_quote_schema_and_table):
mock_schema_sql = Mock(name='schema_sql')
mock_driver = Mock(name='driver', spec=DBDriver)
mock_db = MagicMock(name='db')
mock_driver.db = mock_db
mock_driver.db_conn = mock_db

mock_quote_schema_and_table
mock_driver.has_table.return_value = True
Expand Down

0 comments on commit 8425fdc

Please sign in to comment.