Files
CIAgent/apps/api/tests/collectors/conftest.py
T
saksham 1a4c80958f Initial commit: CI Agent competitive-intelligence monitoring app
FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring,
source collection, LLM-based change analysis, enrichment, and account
security (Turnstile, escalating lockout, email verification).
2026-08-05 10:48:20 -04:00

25 lines
589 B
Python

"""Collector tests never touch the real network or real DNS - every
hostname resolves to a fixed public IP, and respx intercepts the actual
HTTP layer per test."""
from __future__ import annotations
from unittest.mock import patch
import pytest
from app.collectors import robots as robots_module
@pytest.fixture(autouse=True)
def _no_real_dns():
with patch("socket.getaddrinfo", return_value=[(2, 1, 6, "", ("93.184.216.34", 0))]):
yield
@pytest.fixture(autouse=True)
def _reset_robots_cache():
robots_module.clear_cache()
yield
robots_module.clear_cache()