Skip to content

Commit c062f50

Browse files
committed
@sanderegg review: whitespaces test
1 parent d8f78cf commit c062f50

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@ def test_product_to_static():
7979

8080

8181
def test_product_host_regex_with_spaces():
82-
expected = r"([\.-]{0,1}osparc[\.-])".strip()
83-
8482
data = Product.Config.schema_extra["examples"][2]
85-
data["host_regex"] = expected + " " # spaces added at the end
83+
84+
data["support_email"] = " [email protected] " # with leading and trailing spaces and
85+
86+
expected = r"([\.-]{0,1}osparc[\.-])".strip()
87+
data["host_regex"] = expected + " " # with leading trailing spaces
8688

8789
product = Product.parse_obj(data)
90+
8891
assert product.host_regex.pattern == expected
89-
assert product.host_regex.search("osparc.speag.com")
92+
assert product.host_regex.search("osparc.bar.com")
93+
94+
assert product.support_email == "[email protected]"

0 commit comments

Comments
 (0)