We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/benro/personal-productivity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_scrapers.py•1.49 KiB
"""Tests for career domain scrapers."""
import pytest
from mcp_server.domains.career.scrapers.greenhouse import scrape_greenhouse_jobs
from mcp_server.domains.career.scrapers.lever import scrape_lever_jobs
@pytest.mark.asyncio
async def test_greenhouse_scraper_anthropic():
"""Test Greenhouse scraper with Anthropic's job board."""
jobs = await scrape_greenhouse_jobs("anthropic")
assert isinstance(jobs, list)
# Anthropic should have at least some jobs
if len(jobs) > 0:
job = jobs[0]
assert job.company == "anthropic"
assert job.source == "greenhouse"
assert job.title
assert job.url
@pytest.mark.asyncio
async def test_greenhouse_scraper_invalid_company():
"""Test Greenhouse scraper with invalid company."""
jobs = await scrape_greenhouse_jobs("this-company-definitely-does-not-exist-12345")
assert jobs == []
@pytest.mark.asyncio
async def test_lever_scraper():
"""Test Lever scraper with Netflix's job board."""
jobs = await scrape_lever_jobs("netflix")
assert isinstance(jobs, list)
# Netflix should have at least some jobs
if len(jobs) > 0:
job = jobs[0]
assert job.company == "netflix"
assert job.source == "lever"
assert job.title
assert job.url
@pytest.mark.asyncio
async def test_lever_scraper_invalid_company():
"""Test Lever scraper with invalid company."""
jobs = await scrape_lever_jobs("this-company-definitely-does-not-exist-12345")
assert jobs == []