Skip to content

Commit 971ecc4

Browse files
committed
minor test
1 parent 2bfc3ba commit 971ecc4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

services/web/server/tests/unit/isolated/test_products_model.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,14 @@ def test_product_to_static():
7676
],
7777
"isPaymentEnabled": False,
7878
}
79+
80+
81+
def test_product_host_regex_with_spaces():
82+
expected = r"([\.-]{0,1}osparc[\.-])".strip()
83+
84+
data = Product.Config.schema_extra["examples"][2]
85+
data["host_regex"] = expected + " " # spaces added at the end
86+
87+
product = Product.parse_obj(data)
88+
assert product.host_regex.pattern == expected
89+
assert product.host_regex.search("osparcf.speag.com")

0 commit comments

Comments
 (0)