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"