From d5d84cd6da0d42b660c9ffe74a04b4e2b9b84f0a Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:56:23 -0800 Subject: [PATCH] Remove headers --- src/servestatic/utils.py | 2 +- tests/test_asgi.py | 2 +- tests/utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/servestatic/utils.py b/src/servestatic/utils.py index 4c1b595..effce59 100644 --- a/src/servestatic/utils.py +++ b/src/servestatic/utils.py @@ -131,7 +131,7 @@ def __init__( self.closed = False async def _execute(self, func, *args): - """Run a function in a dedicated thread (specific to this class instance).""" + """Run a function in a dedicated thread (specific to each AsyncFile instance).""" if self.loop is None: self.loop = asyncio.get_event_loop() with self.lock: diff --git a/tests/test_asgi.py b/tests/test_asgi.py index 517a439..d4f3828 100644 --- a/tests/test_asgi.py +++ b/tests/test_asgi.py @@ -131,7 +131,7 @@ def test_wrong_method_type(application, test_files): def test_large_static_file(application, test_files): scope = AsgiScopeEmulator({ "path": "/static/large-file.txt", - "headers": [(b"host", b"127.0.0.1:8000")], + "headers": [], }) receive = AsgiReceiveEmulator() send = AsgiSendEmulator() diff --git a/tests/utils.py b/tests/utils.py index 7ba5824..35612e8 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -155,7 +155,7 @@ def body(self): @property def body_count(self): - """Return the number of body messages.""" + """Return the number messages that contain body content.""" return sum(bool(msg.get("body")) for msg in self.message) @property