Page MenuHomeSoftware Heritage

D5931.diff
No OneTemporary

D5931.diff

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
@@ -102,9 +102,9 @@
@composite
-def urls(draw):
+def iris(draw):
protocol = draw(sampled_from(["git", "http", "https", "deb"]))
- domain = draw(from_regex(r"\A([a-z]([a-z0-9-]*)\.){1,3}[a-z0-9]+\Z"))
+ domain = draw(from_regex(r"\A([a-z]([a-z0-9é🏛️-]*)\.){1,3}([a-z0-9é])+\Z"))
return "%s://%s" % (protocol, domain)
@@ -160,7 +160,7 @@
def origins_d():
- return builds(dict, url=urls())
+ return builds(dict, url=iris())
def origins():
@@ -171,7 +171,7 @@
return builds(
dict,
visit=integers(1, 1000),
- origin=urls(),
+ origin=iris(),
date=aware_datetimes(),
type=pgsql_text(),
)
@@ -189,7 +189,7 @@
return builds(
dict,
visit=integers(1, 1000),
- origin=urls(),
+ origin=iris(),
type=optional(sampled_from(["git", "svn", "pypi", "debian"])),
status=sampled_from(
["created", "ongoing", "full", "partial", "not_found", "failed"]
@@ -423,7 +423,7 @@
def metadata_authorities():
- return builds(MetadataAuthority, url=urls(), metadata=just(None))
+ return builds(MetadataAuthority, url=iris(), metadata=just(None))
def metadata_fetchers():

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 18, 6:41 PM (2 h, 4 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216479

Event Timeline