X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/bbfe8e520fea31ad19b8bc2ab5bc02cc5cddb205..30b145cc4660ae5d86bd0de88e373d3107ba54d5:/paperdoorknob_test.py?ds=sidebyside diff --git a/paperdoorknob_test.py b/paperdoorknob_test.py index 28408d6..571dda6 100644 --- a/paperdoorknob_test.py +++ b/paperdoorknob_test.py @@ -45,7 +45,7 @@ class BaseTestProcess(ABC): texifier, lambda x: x, 20, - ContentOnlyLayout(texifier), + ContentOnlyLayout, 'margin=20mm', buf, lambda _: None) @@ -54,12 +54,9 @@ class BaseTestProcess(ABC): (\\usepackage{[a-z]+}\n)+\\usepackage\[margin=20mm\]{geometry} \\begin{document} (.|\n)* -This is \\href{https://glowfic.com}{glowfic} - -You \\emph{sure}\? - -Pretty sure. - +\\glowhead{}{}{}{}This is \\href{https://glowfic.com}{glowfic} +\\glowhead{}{}{}{}You \\emph{sure}\? +\\glowhead{}{}{}{}Pretty sure. \\end{document} ''', buf.getvalue()) @@ -76,7 +73,7 @@ Pretty sure. texifier, lambda x: x, 20, - ContentOnlyLayout(texifier), + ContentOnlyLayout, None, buf, lambda _: None) @@ -94,7 +91,7 @@ Pretty sure. texifier, lambda x: x, 20, - BesideIconLayout(texifier), + BesideIconLayout, None, out, lambda _: None) @@ -124,7 +121,8 @@ class TestProcessFromFakeFetcher(BaseTestProcess, unittest.TestCase): def fetcher(self) -> Fetcher: with open('testdata/this-is-glowfic.html', 'rb') as f: - return FakeFetcher({'fic?view=flat': f.read(9999)}) + html = f.read(9999) + return FakeFetcher({'fic': html, 'fic?view=flat': html}) if __name__ == '__main__':