Changeset View
Changeset View
Standalone View
Standalone View
swh/model/hypothesis_strategies.py
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | return builds( | ||||
type=sampled_from(['git', 'hg', 'svn', 'pypi', 'deb']), | type=sampled_from(['git', 'hg', 'svn', 'pypi', 'deb']), | ||||
url=urls()) | url=urls()) | ||||
def origin_visits(): | def origin_visits(): | ||||
return builds( | return builds( | ||||
OriginVisit, | OriginVisit, | ||||
visit=integers(0, 1000), | visit=integers(0, 1000), | ||||
origin=origins(), | origin=urls(), | ||||
status=sampled_from(['ongoing', 'full', 'partial']), | status=sampled_from(['ongoing', 'full', 'partial']), | ||||
type=pgsql_text()) | type=pgsql_text()) | ||||
@composite | @composite | ||||
def releases(draw): | def releases(draw): | ||||
(date, author) = draw(one_of( | (date, author) = draw(one_of( | ||||
tuples(none(), none()), | tuples(none(), none()), | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |