test(realestate): add pytest harness with isolated SQLite fixture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
11
realestate-lab/tests/test_db_basic.py
Normal file
11
realestate-lab/tests/test_db_basic.py
Normal file
@@ -0,0 +1,11 @@
|
||||
def test_init_db_creates_tables():
|
||||
from app.db import _conn
|
||||
with _conn() as conn:
|
||||
tables = {row[0] for row in conn.execute(
|
||||
"SELECT name FROM sqlite_master WHERE type='table'"
|
||||
)}
|
||||
assert "announcements" in tables
|
||||
assert "announcement_models" in tables
|
||||
assert "user_profile" in tables
|
||||
assert "match_results" in tables
|
||||
assert "collect_log" in tables
|
||||
Reference in New Issue
Block a user