From: Scott Worley Date: Wed, 20 Dec 2023 01:44:32 +0000 (-0800) Subject: Move HTML test data out to separate file X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/dbda64b551aaeffa4f01779a52c7ec68b1fffa98 Move HTML test data out to separate file --- diff --git a/testdata/this-is-glowfic.html b/testdata/this-is-glowfic.html new file mode 100644 index 0000000..22c7a37 --- /dev/null +++ b/testdata/this-is-glowfic.html @@ -0,0 +1,19 @@ + + +
+
We don't want edit boxes
+ This is glowfic + +
+
+
+
We don't want edit boxes
+ You sure? + +
+
+ Pretty sure. +
+
+ + diff --git a/testing/fakeserver.py b/testing/fakeserver.py index 2ed8149..bbeb522 100644 --- a/testing/fakeserver.py +++ b/testing/fakeserver.py @@ -16,25 +16,8 @@ class FakeGlowficHTTPRequestHandler(BaseHTTPRequestHandler): return 200 def do_GET(self) -> None: - body = b''' - -
-
We don't want edit boxes
- This is glowfic - -
-
-
-
We don't want edit boxes
- You sure? - -
-
- Pretty sure. -
-
- -''' + with open("testdata/this-is-glowfic.html", "rb") as f: + body = f.read(9999) self.send_response(self._response_code()) self.send_header("Content-type", "text/html") self.send_header("Content-Length", str(len(body)))