12 lines
322 B
Python
12 lines
322 B
Python
|
|
"""Keep summarizer unit tests importable without Postgres drivers."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
import sys
|
||
|
|
from types import ModuleType
|
||
|
|
|
||
|
|
if "psycopg2" not in sys.modules:
|
||
|
|
fake = ModuleType("psycopg2")
|
||
|
|
fake.connect = lambda **kwargs: None # type: ignore[attr-defined]
|
||
|
|
sys.modules["psycopg2"] = fake
|