(app, client)
| 319 | |
| 320 | |
| 321 | def test_nosubdomain(app, client): |
| 322 | app.config["SERVER_NAME"] = "example.com" |
| 323 | |
| 324 | @app.route("/<company_id>") |
| 325 | def view(company_id): |
| 326 | return company_id |
| 327 | |
| 328 | with app.test_request_context(): |
| 329 | url = flask.url_for("view", company_id="xxx") |
| 330 | |
| 331 | with client: |
| 332 | response = client.get(url) |
| 333 | |
| 334 | assert 200 == response.status_code |
| 335 | assert b"xxx" == response.data |
| 336 | |
| 337 | |
| 338 | def test_cli_runner_class(app): |
nothing calls this directly
no test coverage detected