Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124040
D5930.id21293.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
993 B
Subscribers
None
D5930.id21293.diff
View Options
diff --git a/swh/model/hypothesis_strategies.py b/swh/model/hypothesis_strategies.py
--- a/swh/model/hypothesis_strategies.py
+++ b/swh/model/hypothesis_strategies.py
@@ -4,6 +4,7 @@
# See top-level LICENSE file for more information
import datetime
+import string
from hypothesis import assume
from hypothesis.extra.dateutil import timezones
@@ -426,7 +427,15 @@
def metadata_fetchers():
- return builds(MetadataFetcher, metadata=just(None))
+ return builds(
+ MetadataFetcher,
+ name=text(min_size=1, alphabet=string.printable),
+ version=text(
+ min_size=1,
+ alphabet=string.ascii_letters + string.digits + string.punctuation,
+ ),
+ metadata=just(None),
+ )
def raw_extrinsic_metadata():
@@ -436,6 +445,7 @@
discovery_date=aware_datetimes(),
authority=metadata_authorities(),
fetcher=metadata_fetchers(),
+ format=text(min_size=1, alphabet=string.printable),
)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 20 2024, 10:33 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225703
Attached To
D5930: hypothesis_strategies: Restrict size and alphabets for metadata_fetchers and raw_extrinsic_metadata
Event Timeline
Log In to Comment