Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jsikorski committed Dec 19, 2024
1 parent 8bf5492 commit ab412a9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions tests/nativeapp/test_children.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from pathlib import Path
from textwrap import dedent

import pytest
import yaml
Expand Down Expand Up @@ -139,13 +140,13 @@ def test_children_bundle_with_custom_dir(project_directory):
setup_script_content = f.read()
custom_dir_path = Path("_entities", "my_streamlit")
assert setup_script_content.endswith(
f"""
-- AUTO GENERATED CHILDREN SECTION
CREATE OR REPLACE STREAMLIT IDENTIFIER('v_schema.my_streamlit')
FROM = '{custom_dir_path}'
MAIN_FILE = 'streamlit_app.py';
CREATE APPLICATION ROLE IF NOT EXISTS my_app_role;
GRANT USAGE ON SCHEMA v_schema TO APPLICATION ROLE my_app_role;
GRANT USAGE ON STREAMLIT v_schema.my_streamlit TO APPLICATION ROLE my_app_role;
"""
dedent(f"""
-- AUTO GENERATED CHILDREN SECTION
CREATE OR REPLACE STREAMLIT IDENTIFIER('v_schema.my_streamlit')
FROM '{custom_dir_path}'
MAIN_FILE = 'streamlit_app.py';
CREATE APPLICATION ROLE IF NOT EXISTS my_app_role;
GRANT USAGE ON SCHEMA v_schema TO APPLICATION ROLE my_app_role;
GRANT USAGE ON STREAMLIT v_schema.my_streamlit TO APPLICATION ROLE my_app_role;
""")
)

0 comments on commit ab412a9

Please sign in to comment.