[버그수정]
This commit is contained in:
11
tests/test_site_crawler.py
Normal file
11
tests/test_site_crawler.py
Normal file
@@ -0,0 +1,11 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user