Exemplo n.º 1
0
def test_create_an_account_with_invalid_json_body(
        target_client: RestClient) -> None:
    with pytest.raises(requests.exceptions.HTTPError,
                       match="400 Client Error") as einfo:
        target_client.send("POST", "/accounts", data="invalid json")

    assert "invalid JSON" in einfo.value.response.text
Exemplo n.º 2
0
def test_openapi_spec(target_client: RestClient) -> None:
    resp = target_client.send("GET", "/openapi.yaml")
    assert resp.text