diff --git a/tests/integration/projects/general/tests/test_meta.py b/tests/integration/projects/general/tests/test_meta.py index bc601f1bce3..9f599bb4cb6 100644 --- a/tests/integration/projects/general/tests/test_meta.py +++ b/tests/integration/projects/general/tests/test_meta.py @@ -34,3 +34,17 @@ def path_in_docs(response_body): data=json.dumps("hello"), assert_data=bytes('"hello"', 'ascii'), ) + + +@pytest.mark.asyncio +async def test_customized_request_schema(host): + def has_customized_schema(doc_bytes): + json_str = doc_bytes.decode() + return "field1" in json_str + + await pytest.assert_request( + "GET", + f"http://{host}/docs.json", + headers=(("Content-Type", "application/json"),), + assert_data=has_customized_schema, + )