tests(page): add page test

This commit is contained in:
2026-04-18 16:16:42 +02:00
parent 98e6309256
commit 9dc1627d04
+17
View File
@@ -0,0 +1,17 @@
from src.page import Page
from . import BaseTestCase
class TestPage(BaseTestCase):
def test_repr(self) -> None:
self.assertEqual(str(Page("test_1", with_index=True)), "/test_1/")
def test_repr_no_index(self) -> None:
self.assertEqual(str(Page("test_1", with_index=False)), "/test_1/ (no index)")
def test_repr_with_host(self) -> None:
self.assertEqual(
str(Page("test_1", with_index=True, host="example.com")),
"/test_1/ [example.com]",
)