(app, client, method)
| 52 | |
| 53 | @pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"]) |
| 54 | def test_method_route(app, client, method): |
| 55 | method_route = getattr(app, method) |
| 56 | client_method = getattr(client, method) |
| 57 | |
| 58 | @method_route("/") |
| 59 | def hello(): |
| 60 | return "Hello" |
| 61 | |
| 62 | assert client_method("/").data == b"Hello" |
| 63 | |
| 64 | |
| 65 | def test_method_route_no_methods(app): |
nothing calls this directly
no outgoing calls
no test coverage detected