Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bojiang committed Feb 25, 2021
1 parent 02b43a0 commit 0033d0e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/projects/general/tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit 0033d0e

Please sign in to comment.