Download tests/test_scraper_service.py from isold/MeloonTop: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/spaces/isold/MeloonTop/resolve/main/tests/test_scraper_service.py
- Command line
-
hf download hf://spaces/isold/MeloonTop/tests/test_scraper_service.py
-
curl -L -o test_scraper_service.py https://huggingface.co/spaces/isold/MeloonTop/resolve/main/tests/test_scraper_service.py
463 Bytes
| import pytest | |
| from app.services.scraper import AIScraper | |
| async def test_scrape_all(): | |
| scraper = AIScraper() | |
| results = await scraper.scrape_all() | |
| assert isinstance(results, list) | |
| assert len(results) >= 5 | |
| for item in results: | |
| assert "title" in item | |
| assert "content" in item | |
| assert "url" in item | |
| assert "source" in item | |
| assert "category" in item | |
| assert "published_at" in item | |