Skip to content

Commit

Permalink
update mocks to account for new query_id in the adapter response (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare authored Nov 8, 2024
1 parent 7cc4730 commit 243ea4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/test_snowflake_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def setUp(self):

self.handle = mock.MagicMock(spec=snowflake_connector.SnowflakeConnection)
self.cursor = self.handle.cursor.return_value
# query_id needs to be a string for the adapter response protobuf event
self.sfqid = mock.patch.object(self.cursor, "sfqid", new_callable=lambda: "42")
self.sfqid.start()
self.mock_execute = self.cursor.execute
self.patcher = mock.patch("dbt.adapters.snowflake.connections.snowflake.connector.connect")
self.snowflake = self.patcher.start()
Expand Down Expand Up @@ -99,6 +102,7 @@ def tearDown(self):
self.adapter.cleanup_connections()
self.qh_patch.stop()
self.patcher.stop()
self.sfqid.stop()
self.load_state_check.stop()

def test_quoting_on_drop_schema(self):
Expand Down

0 comments on commit 243ea4f

Please sign in to comment.