swh.model.hypothesis_strategies module¶
-
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.
revision_metadata
()¶
-
swh.model.hypothesis_strategies.
snapshots_d
(*, 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”.