From: Scott Worley Date: Thu, 21 Dec 2023 07:39:49 +0000 (-0800) Subject: Fix flaky test: Increment request count before responding X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/69f86f06f2bfed44d957f0b5eabbdeb47a0e9572?ds=sidebyside Fix flaky test: Increment request count before responding --- diff --git a/testing/fakeserver.py b/testing/fakeserver.py index bbeb522..fbef2e5 100644 --- a/testing/fakeserver.py +++ b/testing/fakeserver.py @@ -16,6 +16,7 @@ class FakeGlowficHTTPRequestHandler(BaseHTTPRequestHandler): return 200 def do_GET(self) -> None: + self._notify_server() with open("testdata/this-is-glowfic.html", "rb") as f: body = f.read(9999) self.send_response(self._response_code()) @@ -23,7 +24,6 @@ class FakeGlowficHTTPRequestHandler(BaseHTTPRequestHandler): self.send_header("Content-Length", str(len(body))) self.end_headers() self.wfile.write(body) - self._notify_server() class FakeGlowficServer():