mirror of
https://github.com/correl/tornado-openapi3.git
synced 2024-11-28 11:09:58 +00:00
22 lines
511 B
Python
22 lines
511 B
Python
|
import hypothesis.strategies as s
|
||
|
from werkzeug.datastructures import Headers
|
||
|
|
||
|
field_names = s.text(
|
||
|
s.characters(
|
||
|
min_codepoint=33,
|
||
|
max_codepoint=126,
|
||
|
blacklist_categories=["Lu"],
|
||
|
blacklist_characters=":\r\n",
|
||
|
),
|
||
|
min_size=1,
|
||
|
)
|
||
|
|
||
|
field_values = s.text(
|
||
|
s.characters(min_codepoint=0x20, max_codepoint=0x7E, blacklist_characters="; \r\n"),
|
||
|
min_size=1,
|
||
|
)
|
||
|
|
||
|
headers: s.SearchStrategy[Headers] = s.builds(
|
||
|
Headers, s.lists(s.tuples(field_names, field_values))
|
||
|
)
|