From 39d7859db6b2b9d1e237cc9fc6ab19c71f764d2f Mon Sep 17 00:00:00 2001 From: Violetta Mishechkina Date: Mon, 26 Aug 2024 12:26:43 +0200 Subject: [PATCH] Fix tests --- dlt/destinations/impl/bigquery/bigquery.py | 4 +--- dlt/destinations/impl/dummy/dummy.py | 2 +- tests/load/test_dummy_client.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlt/destinations/impl/bigquery/bigquery.py b/dlt/destinations/impl/bigquery/bigquery.py index 0a62ea586b..d96eec2d6f 100644 --- a/dlt/destinations/impl/bigquery/bigquery.py +++ b/dlt/destinations/impl/bigquery/bigquery.py @@ -229,9 +229,7 @@ def __init__( config.http_timeout, config.retry_deadline, ) - SupportsStagingDestination.__init__( - self, config.truncate_table_before_load_on_staging_destination - ) + SupportsStagingDestination.__init__(self, config) super().__init__(schema, config, sql_client) self.config: BigQueryClientConfiguration = config self.sql_client: BigQuerySqlClient = sql_client # type: ignore diff --git a/dlt/destinations/impl/dummy/dummy.py b/dlt/destinations/impl/dummy/dummy.py index bade1fd94f..c4fb3889a5 100644 --- a/dlt/destinations/impl/dummy/dummy.py +++ b/dlt/destinations/impl/dummy/dummy.py @@ -134,7 +134,7 @@ def __init__( config: DummyClientConfiguration, capabilities: DestinationCapabilitiesContext, ) -> None: - SupportsStagingDestination.__init__(self, config) + SupportsStagingDestination.__init__(self, config) # type: ignore super().__init__(schema, config, capabilities) self.in_staging_context = False self.config: DummyClientConfiguration = config diff --git a/tests/load/test_dummy_client.py b/tests/load/test_dummy_client.py index 5555d80753..105eefd50e 100644 --- a/tests/load/test_dummy_client.py +++ b/tests/load/test_dummy_client.py @@ -558,7 +558,7 @@ def test_truncate_table_before_load_on_stanging(to_truncate) -> None: load_id, schema = prepare_load_package(load.load_storage, NORMALIZED_FILES) destination_client = load.get_destination_client(schema) assert ( - destination_client.should_truncate_table_before_load_on_staging_destination( + destination_client.should_truncate_table_before_load_on_staging_destination( # type: ignore schema.tables["_dlt_version"] ) == to_truncate