| 255 | # ============================================================ |
| 256 | |
| 257 | class TestFLASK001: |
| 258 | def test_app_run_debug_fires(self): |
| 259 | code = "app.run(host='0.0.0.0', debug=True)" |
| 260 | assert fires(code, "FLASK001"), "FLASK001 must fire: app.run(debug=True)" |
| 261 | |
| 262 | def test_app_debug_assignment_fires(self): |
| 263 | code = "app.debug = True" |
| 264 | assert fires(code, "FLASK001"), "FLASK001 must fire: app.debug = True" |
| 265 | |
| 266 | def test_debug_false_safe(self): |
| 267 | code = "app.run(host='0.0.0.0', debug=False)" |
| 268 | assert not_fires(code, "FLASK001"), "FLASK001 must NOT fire for debug=False" |
| 269 | |
| 270 | |
| 271 | # ============================================================ |
nothing calls this directly
no outgoing calls
no test coverage detected