Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-cnivera committed Sep 17, 2024
1 parent e8d2395 commit c5a98a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions semantic_model_generator/tests/generate_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def test_generate_base_context_with_placeholder_comments(
expected_calls = [
call(_AUTOGEN_COMMENT_WARNING),
call(
"name: my awesome semantic model\ntables:\n - name: ALIAS\n description: some table comment\n base_table:\n database: TEST_DB\n schema: SCHEMA_TEST\n table: ALIAS\n # filters:\n # - name: ' ' # <FILL-OUT>\n # synonyms:\n # - ' ' # <FILL-OUT>\n # description: ' ' # <FILL-OUT>\n # expr: ' ' # <FILL-OUT>\n dimensions:\n - name: ZIP_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: some column comment\n expr: ZIP_CODE\n data_type: TEXT\n time_dimensions:\n - name: BAD_ALIAS\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: BAD_ALIAS\n data_type: TIMESTAMP\n measures:\n - name: AREA_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: AREA_CODE\n data_type: NUMBER\n - name: CBSA\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: CBSA\n data_type: NUMBER\n"
"name: my awesome semantic model\ntables:\n - name: ALIAS\n description: some table comment\n base_table:\n database: TEST_DB\n schema: SCHEMA_TEST\n table: ALIAS\n # filters:\n # - name: ' ' # <FILL-OUT>\n # synonyms:\n # - ' ' # <FILL-OUT>\n # description: ' ' # <FILL-OUT>\n # expr: ' ' # <FILL-OUT>\n dimensions:\n - name: ZIP_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: some column comment\n expr: ZIP_CODE\n data_type: TEXT\n time_dimensions:\n - name: BAD_ALIAS\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: BAD_ALIAS\n data_type: TIMESTAMP\n measures:\n - name: AREA_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: AREA_CODE\n data_type: NUMBER\n - name: CBSA\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: CBSA\n data_type: NUMBER\n"
),
]
mock_file().write.assert_has_calls(expected_calls)
Expand Down Expand Up @@ -426,7 +426,7 @@ def test_generate_base_context_with_placeholder_comments_cross_database_cross_sc
expected_calls = [
call(_AUTOGEN_COMMENT_WARNING),
call(
"name: Another Incredible Semantic Model\ntables:\n - name: ALIAS\n description: some table comment\n base_table:\n database: TEST_DB\n schema: SCHEMA_TEST\n table: ALIAS\n # filters:\n # - name: ' ' # <FILL-OUT>\n # synonyms:\n # - ' ' # <FILL-OUT>\n # description: ' ' # <FILL-OUT>\n # expr: ' ' # <FILL-OUT>\n dimensions:\n - name: ZIP_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: some column comment\n expr: ZIP_CODE\n data_type: TEXT\n time_dimensions:\n - name: BAD_ALIAS\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: BAD_ALIAS\n data_type: TIMESTAMP\n measures:\n - name: AREA_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: AREA_CODE\n data_type: NUMBER\n - name: CBSA\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: CBSA\n data_type: NUMBER\n - name: PRODUCTS\n description: ' ' # <FILL-OUT>\n base_table:\n database: A_DIFFERENT_DATABASE\n schema: A_DIFFERENT_SCHEMA\n table: PRODUCTS\n # filters:\n # - name: ' ' # <FILL-OUT>\n # synonyms:\n # - ' ' # <FILL-OUT>\n # description: ' ' # <FILL-OUT>\n # expr: ' ' # <FILL-OUT>\n measures:\n - name: SKU\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: SKU\n data_type: NUMBER\n sample_values:\n - '1'\n - '2'\n - '3'\n"
"name: Another Incredible Semantic Model\ntables:\n - name: ALIAS\n description: some table comment\n base_table:\n database: TEST_DB\n schema: SCHEMA_TEST\n table: ALIAS\n # filters:\n # - name: ' ' # <FILL-OUT>\n # synonyms:\n # - ' ' # <FILL-OUT>\n # description: ' ' # <FILL-OUT>\n # expr: ' ' # <FILL-OUT>\n dimensions:\n - name: ZIP_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: some column comment\n expr: ZIP_CODE\n data_type: TEXT\n time_dimensions:\n - name: BAD_ALIAS\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: BAD_ALIAS\n data_type: TIMESTAMP\n measures:\n - name: AREA_CODE\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: AREA_CODE\n data_type: NUMBER\n - name: CBSA\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: CBSA\n data_type: NUMBER\n - name: PRODUCTS\n description: ' ' # <FILL-OUT>\n base_table:\n database: A_DIFFERENT_DATABASE\n schema: A_DIFFERENT_SCHEMA\n table: PRODUCTS\n # filters:\n # - name: ' ' # <FILL-OUT>\n # synonyms:\n # - ' ' # <FILL-OUT>\n # description: ' ' # <FILL-OUT>\n # expr: ' ' # <FILL-OUT>\n measures:\n - name: SKU\n synonyms:\n - ' ' # <FILL-OUT>\n description: ' ' # <FILL-OUT>\n expr: SKU\n data_type: NUMBER\n sample_values:\n - '1'\n - '2'\n - '3'\n"
),
]

Expand Down

0 comments on commit c5a98a7

Please sign in to comment.