From 62771d73534e5870195e0f447f5b66a6610b6956 Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Thu, 5 Jan 2023 13:34:32 -0600 Subject: Add test --- tests.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests.py') diff --git a/tests.py b/tests.py index 384c304..533d2c2 100755 --- a/tests.py +++ b/tests.py @@ -30,6 +30,17 @@ def test_html_get_post(): assert "Debugging CGI / CGit" not in text +def test_html_get_base_url(): + url = BASE_URL + r = requests.get(url) + assert r.status_code == 200 + text = r.text + assert "A Solid Breakdown of the Linux Font Rendering Stack" in text + assert "hinting and anti-aliasing" in text + + assert "Debugging CGI / CGit" in text + + def test_html_get_posts(): url = f"{BASE_URL}/posts" r = requests.get(url) @@ -99,7 +110,6 @@ def test_json_get_post_not_found(): assert "Resource not found" in j - def main(): for func in dir(sys.modules[__name__]): if func.startswith("test_"): -- cgit v1.2.3