swh.model.hypothesis_strategies module

swh.model.hypothesis_strategies.optional(strategy)[source]
swh.model.hypothesis_strategies.pgsql_text()[source]
swh.model.hypothesis_strategies.sha1_git()[source]
swh.model.hypothesis_strategies.sha1()[source]
swh.model.hypothesis_strategies.aware_datetimes()[source]
swh.model.hypothesis_strategies.urls()[source]
swh.model.hypothesis_strategies.persons_d()[source]
swh.model.hypothesis_strategies.persons()[source]
swh.model.hypothesis_strategies.timestamps_d()[source]
swh.model.hypothesis_strategies.timestamps()[source]
swh.model.hypothesis_strategies.timestamps_with_timezone_d(timestamp=builds(dict, microseconds=integers(min_value=0, max_value=1000000), seconds=integers(min_value=- 62135596800.0, max_value=253402300800.0)), offset=integers(min_value=- 840, max_value=840), negative_utc=booleans())[source]
swh.model.hypothesis_strategies.origins_d()[source]
swh.model.hypothesis_strategies.origins()[source]
swh.model.hypothesis_strategies.origin_visits_d()[source]
swh.model.hypothesis_strategies.origin_visits()[source]
swh.model.hypothesis_strategies.metadata_dicts()[source]
swh.model.hypothesis_strategies.origin_visit_statuses_d()[source]
swh.model.hypothesis_strategies.origin_visit_statuses()[source]
swh.model.hypothesis_strategies.releases_d()[source]
swh.model.hypothesis_strategies.releases()[source]
swh.model.hypothesis_strategies.revision_metadata()
swh.model.hypothesis_strategies.extra_headers()[source]
swh.model.hypothesis_strategies.revisions_d()[source]
swh.model.hypothesis_strategies.revisions()[source]
swh.model.hypothesis_strategies.directory_entries_d()[source]
swh.model.hypothesis_strategies.directory_entries()[source]
swh.model.hypothesis_strategies.directories_d()[source]
swh.model.hypothesis_strategies.directories()[source]
swh.model.hypothesis_strategies.contents_d()[source]
swh.model.hypothesis_strategies.contents()[source]
swh.model.hypothesis_strategies.present_contents_d()[source]
swh.model.hypothesis_strategies.present_contents()[source]
swh.model.hypothesis_strategies.skipped_contents_d()[source]
swh.model.hypothesis_strategies.skipped_contents()[source]
swh.model.hypothesis_strategies.branch_names()[source]
swh.model.hypothesis_strategies.branch_targets_object_d()[source]
swh.model.hypothesis_strategies.branch_targets_alias_d()[source]
swh.model.hypothesis_strategies.branch_targets_d(*, only_objects=False)[source]
swh.model.hypothesis_strategies.branch_targets(*, only_objects=False)[source]
swh.model.hypothesis_strategies.snapshots_d(*, min_size=0, max_size=100, only_objects=False)[source]
swh.model.hypothesis_strategies.snapshots(*, min_size=0, max_size=100, only_objects=False)[source]
swh.model.hypothesis_strategies.objects(blacklist_types='origin_visit_status', split_content=False)[source]

generates a random couple (type, obj)

which obj is an instance of the Model class corresponding to obj_type.

blacklist_types is a list of obj_type to exclude from the strategy.

If split_content is True, generates Content and SkippedContent under different obj_type, resp. “content” and “skipped_content”.

swh.model.hypothesis_strategies.object_dicts(blacklist_types='origin_visit_status', split_content=False)[source]

generates a random couple (type, dict)

which dict is suitable for <ModelForType>.from_dict() factory methods.

blacklist_types is a list of obj_type to exclude from the strategy.

If split_content is True, generates Content and SkippedContent under different obj_type, resp. “content” and “skipped_content”.