mirror of
https://github.com/simple-login/app.git
synced 2024-11-17 22:21:38 +08:00
10 lines
348 B
Python
10 lines
348 B
Python
|
from app.dashboard.views.domain_detail import regex_match
|
||
|
|
||
|
|
||
|
def test_regex_match(flask_client):
|
||
|
assert regex_match("prefix.*", "prefix-abcd")
|
||
|
|
||
|
# this generates re2 error "Argument 'pattern' has incorrect type (expected bytes, got PythonRePattern)"
|
||
|
# fallback to re
|
||
|
assert not regex_match("(?!abcd)s(\\.|-)?([a-z0-9]{4,6})", "abcd")
|