Verify exact-run CSV publication
This commit is contained in:
@@ -384,7 +384,7 @@ class ReportingServiceTests(unittest.TestCase):
|
||||
)
|
||||
self.assertTrue(raised.exception.execution_id)
|
||||
|
||||
def test_dataflow_dataset_can_pin_an_exact_published_run(self) -> None:
|
||||
def test_dataflow_run_can_be_exported_as_formula_safe_csv(self) -> None:
|
||||
payload = dataset_payload()
|
||||
rows = list(payload.pop("static_rows"))
|
||||
payload.update(
|
||||
@@ -410,7 +410,7 @@ class ReportingServiceTests(unittest.TestCase):
|
||||
report_id="report-1",
|
||||
report_revision=1,
|
||||
parameters={},
|
||||
query=None,
|
||||
query=ReportQuery(mode="detail", dimensions=["note"]),
|
||||
idempotency_key="published-dataflow-run",
|
||||
)
|
||||
|
||||
@@ -421,6 +421,15 @@ class ReportingServiceTests(unittest.TestCase):
|
||||
provider.last_request.run_ref,
|
||||
)
|
||||
self.assertTrue(result["provenance"]["source"]["immutable_run"])
|
||||
content, content_type, filename = export_execution(
|
||||
self.session,
|
||||
self.principal,
|
||||
execution_id=str(result["execution_id"]),
|
||||
format="csv",
|
||||
)
|
||||
self.assertEqual("text/csv; charset=utf-8", content_type)
|
||||
self.assertTrue(filename.endswith(".csv"))
|
||||
self.assertIn("'=cmd", content.decode("utf-8-sig"))
|
||||
|
||||
def test_restricted_access_and_service_scope_guards(self) -> None:
|
||||
self._create_report_graph(
|
||||
|
||||
Reference in New Issue
Block a user