Skip to content

Commit 2b4b78d

Browse files
committed
Fix dotted test
1 parent ee6d8cf commit 2b4b78d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_static.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,10 @@ def test_dotted_dir_ok(
605605
app: Sanic, static_file_directory: str, double_dotted_directory_file: Path
606606
):
607607
app.static("/foo", static_file_directory)
608-
double_dotted_directory_file = str(double_dotted_directory_file).lstrip(
609-
static_file_directory
608+
dot_relative_path = str(
609+
double_dotted_directory_file.relative_to(static_file_directory)
610610
)
611-
_, response = app.test_client.get("/foo/" + double_dotted_directory_file)
611+
_, response = app.test_client.get("/foo/" + dot_relative_path)
612612
assert response.status == 200
613613
assert response.body == b"DOT\n"
614614

0 commit comments

Comments
 (0)