from crawler_platform.app.core.crawler.site_crawler import classify_page, normalize_url def test_classify_perfume_product_page(): text = "Top notes: Bergamot, Neroli\nMiddle notes: Jasmine\nBase notes: Musk\nPrice $89" assert classify_page("https://example.com/products/neroli", "Neroli Summer", text) == "product" def test_normalize_url_removes_fragment_and_trailing_slash(): assert normalize_url("https://example.com/path/#details") == "https://example.com/path"