Files
hnsau/test_hnsau.py
nathanwoodburn 8bf2edaa22
Build Docker / Build Image (push) Successful in 1m14s
feat: Add dynamic ownthedot
2026-08-24 14:46:41 +10:00

28 lines
927 B
Python

import unittest
from server import app
class TestHnsauRoutes(unittest.TestCase):
def setUp(self):
app.config['TESTING'] = True
self.client = app.test_client()
def test_hnsau_home(self):
response = self.client.get('/', headers={'Host': 'hns.au'})
self.assertEqual(response.status_code, 200)
def test_hnsau_about_redirect(self):
response = self.client.get('/about', headers={'Host': 'hns.au'})
self.assertEqual(response.status_code, 302)
self.assertEqual(response.headers['Location'], '/#about')
def test_hnsau_pins(self):
response = self.client.get('/pins', headers={'Host': 'hns.au'})
self.assertEqual(response.status_code, 200)
def test_hnsau_links(self):
response = self.client.get('/links', headers={'Host': 'hns.au'})
self.assertEqual(response.status_code, 200)
if __name__ == '__main__':
unittest.main()