aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael McVady <femtonaut@gmail.com>2023-01-05 13:34:32 -0600
committerMichael McVady <femtonaut@gmail.com>2023-01-05 13:34:32 -0600
commit62771d73534e5870195e0f447f5b66a6610b6956 (patch)
treed3593cd0f8df2a74d0ea799721b1154a41f51933
parenta3660adb90fd7c488f9d7baa0350bb4e2301ccb9 (diff)
Add test
-rwxr-xr-xtests.py12
1 files changed, 11 insertions, 1 deletions
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_"):