diff --git a/semantic_model_generator/tests/generate_model_test.py b/semantic_model_generator/tests/generate_model_test.py index 7a4143f4..17d95d73 100644 --- a/semantic_model_generator/tests/generate_model_test.py +++ b/semantic_model_generator/tests/generate_model_test.py @@ -131,10 +131,10 @@ def mock_dependencies(mock_snowflake_connection): ] with patch( - "semantic_model_generator.main.get_valid_schemas_tables_columns_df", + "semantic_model_generator.generate_model.get_valid_schemas_tables_columns_df", side_effect=valid_schemas_tables_representations, ), patch( - "semantic_model_generator.main.get_table_representation", + "semantic_model_generator.generate_model.get_table_representation", side_effect=table_representations, ): yield @@ -146,11 +146,11 @@ def test_raw_schema_to_semantic_context( want_yaml = "name: this is the best semantic model ever\ntables:\n - name: ALIAS\n description: ' '\n base_table:\n database: test_db\n schema: schema_test\n table: ALIAS\n filters:\n - name: ' '\n synonyms:\n - ' '\n description: ' '\n expr: ' '\n dimensions:\n - name: ZIP_CODE\n synonyms:\n - ' '\n description: ' '\n expr: ZIP_CODE\n data_type: TEXT\n time_dimensions:\n - name: BAD_ALIAS\n synonyms:\n - ' '\n description: ' '\n expr: BAD_ALIAS\n data_type: TIMESTAMP\n measures:\n - name: AREA_CODE\n synonyms:\n - ' '\n description: ' '\n expr: AREA_CODE\n data_type: NUMBER\n - name: CBSA\n synonyms:\n - ' '\n description: ' '\n expr: CBSA\n data_type: NUMBER\n" snowflake_account = "test_account" - fqn_tables = ["test_db.schema_test.ALIAS"] + physical_tables = ["test_db.schema_test.ALIAS"] semantic_model_name = "this is the best semantic model ever" semantic_model = raw_schema_to_semantic_context( - fqn_tables=fqn_tables, + physical_tables=physical_tables, snowflake_account=snowflake_account, semantic_model_name=semantic_model_name, ) @@ -180,13 +180,13 @@ def test_generate_base_context_with_placeholder_comments( mock_snowflake_connection_env, ): - fqn_tables = ["test_db.schema_test.ALIAS"] + physical_tables = ["test_db.schema_test.ALIAS"] snowflake_account = "test_account" output_path = "output_model_path.yaml" semantic_model_name = "my awesome semantic model" generate_base_semantic_context_from_snowflake( - fqn_tables=fqn_tables, + physical_tables=physical_tables, snowflake_account=snowflake_account, output_yaml_path=output_path, semantic_model_name=semantic_model_name, @@ -207,7 +207,7 @@ def test_generate_base_context_with_placeholder_comments_cross_database_cross_sc mock_snowflake_connection_env, ): - fqn_tables = [ + physical_tables = [ "test_db.schema_test.ALIAS", "a_different_database.a_different_schema.PRODUCTS", ] @@ -216,7 +216,7 @@ def test_generate_base_context_with_placeholder_comments_cross_database_cross_sc semantic_model_name = "Another Incredible Semantic Model" generate_base_semantic_context_from_snowflake( - fqn_tables=fqn_tables, + physical_tables=physical_tables, snowflake_account=snowflake_account, output_yaml_path=output_path, semantic_model_name=semantic_model_name,