diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2025-05-28 16:32:29 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2025-05-28 16:32:29 +0900 |
commit | 1b7b6dcd9390464d6a4c79dceac15414139354f7 (patch) | |
tree | fa8d9894e3b6ec95a746155bdf54a20273aaaeed /tst/test_listen.py | |
parent | aec9f489eed05e01dfe358e71e14870dbbf0196b (diff) | |
download | scadere-1b7b6dcd9390464d6a4c79dceac15414139354f7.tar.gz |
Fix server root path in tests
Diffstat (limited to 'tst/test_listen.py')
-rw-r--r-- | tst/test_listen.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tst/test_listen.py b/tst/test_listen.py index 573330b..b38a26a 100644 --- a/tst/test_listen.py +++ b/tst/test_listen.py @@ -146,8 +146,9 @@ def is_root(base_url, url): Paths starting with // are excluded because urljoin sometimes confuse them with URL scheme. """ + base_path = urlsplit(base_url).path url_path = urlsplit(url).path - return (urlsplit(urljoin(base_url, url_path)).path == url_path + return (urlsplit(urljoin(base_url, url_path)).path == base_path and not url_path.startswith('//')) |