diff options
author | Michael McVady <femtonaut@gmail.com> | 2023-01-05 13:34:32 -0600 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2023-01-05 13:34:32 -0600 |
commit | 62771d73534e5870195e0f447f5b66a6610b6956 (patch) | |
tree | d3593cd0f8df2a74d0ea799721b1154a41f51933 | |
parent | a3660adb90fd7c488f9d7baa0350bb4e2301ccb9 (diff) |
Add test
-rwxr-xr-x | tests.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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_"): |