Skip to content

Commit dc514ca

Browse files
Remove unnecessary comments from grants tests
- Remove explanatory comments that don't add value - Code is self-explanatory without extra commentary - Cleaner and more concise implementation
1 parent c5ae45c commit dc514ca

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

tests_integration/test_streamlit.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def test_streamlit_grants_flow(
142142
alter_snowflake_yml,
143143
):
144144
"""Test that streamlit grants are properly applied during deployment."""
145-
# Use the session's default role (main CI role)
146145
test_role = snowflake_session.role
147146
entity_id = "app_1"
148147

@@ -170,7 +169,6 @@ def test_streamlit_grants_experimental_flow(
170169
alter_snowflake_yml,
171170
):
172171
"""Test that streamlit grants are properly applied during experimental deployment."""
173-
# Use the session's default role (main CI role)
174172
test_role = snowflake_session.role
175173
entity_id = "app_1"
176174

tests_integration/testing_utils/streamlit_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,13 @@ def assert_proper_url_is_returned(
184184
assert message.endswith(create_expected_url_suffix(entity_id, session))
185185

186186
def verify_grants_applied(self, entity_id: str, test_role: str):
187-
# Switch to test role and verify grants work
188187
self.setup.sql_test_helper.execute_single_sql(f"USE ROLE {test_role}")
189188
streamlits_with_role = self.setup.sql_test_helper.execute_single_sql(
190189
f"SHOW STREAMLITS LIKE '{entity_id}'"
191190
)
192191
assert (
193192
len(streamlits_with_role) == 1
194193
), f"Role {test_role} should have USAGE access to the streamlit"
195-
# No need to switch back since this is at the end of the test
196194

197195

198196
def create_expected_url_suffix(entity_id: str, session: SnowflakeConnection):

0 commit comments

Comments
 (0)