From e5f525f0ecf8b0b92d24ad08edd54716c2fefe6a Mon Sep 17 00:00:00 2001 From: Mathieu Larose Date: Tue, 29 Oct 2024 18:06:59 -0400 Subject: [PATCH] fix(dagster-snowflake): fix test_fetch_last_updated_timestamps_missing_table (#25623) ## Summary & Motivation This change fix the `test_fetch_last_updated_timestamps_missing_table` function in the Snowflake resource tests. Also fixes a small pyright issue in tableau tests ## How I Tested These Changes - [ ] validate that the failing BK tests are now passing --- .../dagster_snowflake_tests/test_resources.py | 5 +++-- .../dagster_tableau_tests/test_asset_specs.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/python_modules/libraries/dagster-snowflake/dagster_snowflake_tests/test_resources.py b/python_modules/libraries/dagster-snowflake/dagster_snowflake_tests/test_resources.py index 965a7908af357..82339788b3de9 100644 --- a/python_modules/libraries/dagster-snowflake/dagster_snowflake_tests/test_resources.py +++ b/python_modules/libraries/dagster-snowflake/dagster_snowflake_tests/test_resources.py @@ -317,19 +317,20 @@ def test_fetch_last_updated_timestamps_missing_table(): conn.cursor().execute(f"create table {table_name} (foo string)") conn.cursor().execute(f"insert into {table_name} values ('bar')") + reversed_table_name = table_name[::-1] with pytest.raises(ValueError): freshness = fetch_last_updated_timestamps( snowflake_connection=conn, database="TESTDB", # Second table does not exist, expects ValueError - tables=[table_name, reversed(table_name)], + tables=[table_name, reversed_table_name], schema="TESTSCHEMA", ) freshness = fetch_last_updated_timestamps( snowflake_connection=conn, database="TESTDB", - tables=[table_name, reversed(table_name)], + tables=[table_name, reversed_table_name], schema="TESTSCHEMA", ignore_missing_tables=True, ) diff --git a/python_modules/libraries/dagster-tableau/dagster_tableau_tests/test_asset_specs.py b/python_modules/libraries/dagster-tableau/dagster_tableau_tests/test_asset_specs.py index 9e941cb5db36e..7e86c793f472c 100644 --- a/python_modules/libraries/dagster-tableau/dagster_tableau_tests/test_asset_specs.py +++ b/python_modules/libraries/dagster-tableau/dagster_tableau_tests/test_asset_specs.py @@ -86,7 +86,7 @@ def test_translator_spec( host_key: host_value, } - resource = clazz(**resource_args) # type: ignore + resource = clazz(**resource_args) resource.build_client() all_assets = load_tableau_asset_specs(resource)