Milestone 1.

This commit is contained in:
2025-08-18 20:14:56 +02:00
parent 9d1623c739
commit 1646d7b827
23 changed files with 1684 additions and 1275 deletions

20
tests/test_slugs.py Normal file
View File

@@ -0,0 +1,20 @@
from app.utils.slugs import slugify
def test_slugify_basic():
assert slugify("Hello World") == "hello-world"
assert slugify("Hello World!!!") == "hello-world"
assert slugify("Café au lait") == "cafe-au-lait"
assert slugify("123 Numbers First") == "123-numbers-first"
def test_slugify_length():
long = "A" * 200
s = slugify(long, max_length=32)
assert len(s) <= 32
assert s.startswith("a")
def test_slugify_empty():
assert slugify("") == "untitled"
assert slugify("!!!") == "untitled"