Changeset View
Changeset View
Standalone View
Standalone View
swh/model/hypothesis_strategies.py
Show First 20 Lines • Show All 72 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=origins(), | ||||
status=sampled_from(['ongoing', 'full', 'partial']), | |||||
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()), | ||||
tuples(timestamps_with_timezone(), persons()))) | tuples(timestamps_with_timezone(), persons()))) | ||||
rel = draw(builds( | rel = draw(builds( | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |