Files
huizenbot/tests/test_adapters.py

18 lines
494 B
Python

import sys
sys.path.insert(0, "../src")
from cache import * # noqa: F401 — must be before adapter imports
from adapters import SCRAPERS
# --- change this to test a different adapter ---
ADAPTER = SCRAPERS['ooms']
if __name__ == "__main__":
print(f"Testing adapter: {ADAPTER.__name__}")
listings = ADAPTER()
print(f"Got {len(listings)} listings\n")
for l in listings:
print(f" {l.adres}, {l.postcode}, {l.stad} — €{l.prijs}{l.kamers} rooms — {l.url}")