From 7ecbe96493e7a0421a3cab8b5f55be1c95c31f50 Mon Sep 17 00:00:00 2001 From: Aaron Steers Date: Mon, 18 Mar 2024 15:07:14 -0700 Subject: [PATCH] add test of props --- tests/integration_tests/test_bigquery_cache.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/integration_tests/test_bigquery_cache.py b/tests/integration_tests/test_bigquery_cache.py index 23b69f7d..d34e2319 100644 --- a/tests/integration_tests/test_bigquery_cache.py +++ b/tests/integration_tests/test_bigquery_cache.py @@ -81,6 +81,20 @@ def source_faker_seed_b() -> ab.Source: return source +def test_bigquery_props( + new_bigquery_cache: ab.BigQueryCache, +) -> None: + """Test that the BigQueryCache properties are set correctly.""" + # assert new_bigquery_cache.credentials_path.endswith(".json") + assert new_bigquery_cache.dataset_name == new_bigquery_cache.schema_name, \ + "Dataset name should be the same as schema name." + assert new_bigquery_cache.schema_name != "airbyte_raw" \ + "Schema name should not be the default value." + + assert new_bigquery_cache.get_database_name() == new_bigquery_cache.project_name, \ + "Database name should be the same as project name." + + # Uncomment this line if you want to see performance trace logs. # You can render perf traces using the viztracer CLI or the VS Code VizTracer Extension. #@viztracer.trace_and_save(output_dir=".pytest_cache/snowflake_trace/")