Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions tests/test_response_actions_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ def test_returns_502_when_manager_unreachable(self):

def test_console_source_never_gains_a_mutating_route(self):
# The CI-enforced "CONSOLE READ-ONLY" invariant (panopticon-diagrams'
# _tooling/validate.py) checks for these substrings across the whole
# repo; pin it here too so a regression fails fast in this repo's own
# CI, not only downstream in diagrams'.
# _tooling/validate.py) greps every .py/.js file in this repo -- test
# files included -- for these two literal substrings, so they are
# built here rather than written out directly to avoid this very
# test tripping the check it's meant to pin.
mutating_handlers = ["do_" + "POST", "do_" + "PUT"]
source = (Path(__file__).resolve().parent.parent / "app.py").read_text(encoding="utf-8")
js_source = (Path(__file__).resolve().parent.parent / "static" / "app.js").read_text(encoding="utf-8")
self.assertNotIn("do_POST", source)
self.assertNotIn("do_PUT", source)
self.assertNotIn("do_POST", js_source)
self.assertNotIn("do_PUT", js_source)
for handler in mutating_handlers:
self.assertNotIn(handler, source)
self.assertNotIn(handler, js_source)


if __name__ == "__main__":
Expand Down
Loading