fix(avocet): queue_with_items fixture uses api._DATA_DIR to avoid implicit tmp_path coupling
This commit is contained in:
parent
9abae0478c
commit
c1a6dd4fc5
1 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ def client():
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def queue_with_items(tmp_path):
|
def queue_with_items():
|
||||||
"""Write 3 test emails to the queue file."""
|
"""Write 3 test emails to the queue file."""
|
||||||
from app import api as api_module
|
from app import api as api_module
|
||||||
items = [
|
items = [
|
||||||
|
|
@ -35,7 +35,7 @@ def queue_with_items(tmp_path):
|
||||||
"from": "test@example.com", "date": "2026-03-01", "source": "imap:test"}
|
"from": "test@example.com", "date": "2026-03-01", "source": "imap:test"}
|
||||||
for i in range(3)
|
for i in range(3)
|
||||||
]
|
]
|
||||||
queue_path = tmp_path / "email_label_queue.jsonl"
|
queue_path = api_module._DATA_DIR / "email_label_queue.jsonl"
|
||||||
queue_path.write_text("\n".join(json.dumps(x) for x in items) + "\n")
|
queue_path.write_text("\n".join(json.dumps(x) for x in items) + "\n")
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue