Skip to content

Commit

Permalink
Fixed test_staticfiles_handler_can_generate_file_path on Windows. (#1871
Browse files Browse the repository at this point in the history
)
  • Loading branch information
smithdc1 committed Jul 11, 2022
1 parent 6dd2035 commit a57a83c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_staticfiles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import pytest

from channels.staticfiles import StaticFilesHandler, StaticFilesWrapper
Expand Down Expand Up @@ -120,6 +122,6 @@ async def __call__(self, scope, receive, send):
)
scope = request_for_path("/static/image.png")
scope["method"] = "GET"
assert (
await wrapper(scope, None, None) == "/image.png"
assert await wrapper(scope, None, None) == os.path.normpath(
"/image.png"
), "StaticFilesWrapper should serve paths under the STATIC_URL path"

0 comments on commit a57a83c

Please sign in to comment.