]> git.scottworley.com Git - paperdoorknob/commitdiff
Fix flaky test: Increment request count before responding
authorScott Worley <scottworley@scottworley.com>
Thu, 21 Dec 2023 07:39:49 +0000 (23:39 -0800)
committerScott Worley <scottworley@scottworley.com>
Thu, 21 Dec 2023 07:39:49 +0000 (23:39 -0800)
testing/fakeserver.py

index bbeb52267a40ed788229575d789dc3097b186c0f..fbef2e537b38de344c6817192899ce80d9c697c7 100644 (file)
@@ -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():