mapledan commented on PR #42785: URL: https://github.com/apache/superset/pull/42785#issuecomment-5778733048
Pushed 48b81a9, from the latest bito round. The useful catch was the `| random` template in `test_run_reauthorizes_the_rendered_sql`: with `process_template` mocked to a fixed string, nothing about `random` — or about rendering at all — was exercised, while the docstring described exactly that. The claim is gone rather than dressed up. The SQL is now plainly different from the mocked render, the docstring says this is a call-shape test and nothing more, and it points at `test_run_refuses_a_render_the_caller_cannot_access`, which runs the real authorization gate on a rendered string. Four neighbouring tests had the same shape and are now built on a real template processor. One was worse than a wording problem: it asserted `SupersetParseError` arriving from `_apply_sql_security`, but with a real processor the parse fails earlier, in `get_undefined_parameters` — it was covering a path production cannot take. A fifth, which only asserted that a mocked gate's exception propagates, is deleted; the real-gate test covers the same ground. Every test here that claims to guard a regression now has the defect reintroduced and confirmed failing: the render gate, the undefined-parameter check, the pinned `executed_sql`, the query handed to the processor, and the `schema` keyword that shadowed a user's template parameter. Net effect on the suite is smaller, not larger — 85 lines out, 48 in. Also from that round: the dead `# noqa: E402`, a docstring on the `resolved` helper, and an assertion that the jinja2 reason survives the wrap rather than only its error type. Test counts, since CI can't reach this path: `tests/unit_tests` passes 12393 with 43 pre-existing environment failures — the same 43 the base produces with this branch's five files reverted. `babel-extract` is still red for the nine `reports`/`screenshot` strings described above, which are master's. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
