Skip to content

Commit 24b4591

Browse files
SG-35561 Update the test case for permissions and availability (#437)
1 parent ac46ff1 commit 24b4591

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

tests/test_api.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,18 +1960,20 @@ def test_export_page_unavailable(self):
19601960
return
19611961

19621962
page_entity = self.sg.create("Page", {"entity_type": "Shot"})
1963+
error_messages = [
1964+
"This functionality is currently not available",
1965+
f"Export for Page id={page_entity['id']} not available",
1966+
]
19631967

19641968
with self.assertRaises(Exception) as cm:
19651969
self.sg.export_page(page_entity["id"], "csv")
1966-
self.assertIn(
1967-
f"This functionality is currently not available", str(cm.exception)
1968-
)
1970+
msg = str(cm.exception)
1971+
self.assertIn(msg, error_messages)
19691972

19701973
with self.assertRaises(Exception) as cm:
19711974
self.sg.export_page(page_entity["id"], "csv", layout_name="My Layout")
1972-
self.assertIn(
1973-
f"This functionality is currently not available", str(cm.exception)
1974-
)
1975+
msg = str(cm.exception)
1976+
self.assertIn(msg, error_messages)
19751977

19761978
def test_export_page_format_missing(self):
19771979
"""

0 commit comments

Comments
 (0)