]> git.scottworley.com Git - paperdoorknob/blobdiff - testing/fakeserver.py
New dependency: wrapfig TeX package
[paperdoorknob] / testing / fakeserver.py
index 2ed8149b2dfbe41dce5e9e1e9ce61af020c607ef..bbeb52267a40ed788229575d789dc3097b186c0f 100644 (file)
@@ -16,25 +16,8 @@ class FakeGlowficHTTPRequestHandler(BaseHTTPRequestHandler):
         return 200
 
     def do_GET(self) -> None:
-        body = b'''<html>
-  <body>
-    <div class="post-container post-post">
-      <div class="post-edit-box">We don't want edit boxes</div>
-      This is glowfic
-      <div class="post-footer">We don't want footers</div>
-    </div>
-    <div class="flat-post-replies">
-      <div class="post-container post-reply">
-        <div class="post-edit-box">We don't want edit boxes</div>
-        You <em>sure</em>?
-        <div class="post-footer">We don't want footers</div>
-      </div>
-      <div class="post-container post-reply">
-        Pretty sure.
-      </div>
-    </div>
-  </body>
-</html>'''
+        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)))