💬 Commit message: Update 2026-02-15 06:21:35, 7 files, 1559 lines

📁 Files changed: 7
📝 Lines changed: 1559

  • .coverage
  • cli.py
  • __init__.py
  • conftest.py
  • test_client.py
  • test_generate.py
  • test_server.py
This commit is contained in:
Adam Ladachowski
2026-02-15 06:21:35 +01:00
parent c419e443ae
commit 356d8fd156
7 changed files with 52 additions and 1507 deletions
-20
View File
@@ -7,11 +7,6 @@ import json
import struct
import pytest
import respx
from tensors.generate import SDClient
BASE_URL = "http://127.0.0.1:1234"
# 1x1 red PNG for image response stubs
TINY_PNG = (
@@ -43,18 +38,3 @@ def temp_safetensor(tmp_path):
f.write(header_bytes)
return file_path
@pytest.fixture()
def mock_api():
"""Activate respx mock for the sd-server base URL."""
with respx.mock(base_url=BASE_URL, assert_all_called=False) as rsps:
yield rsps
@pytest.fixture()
def client(mock_api: respx.MockRouter) -> SDClient: # noqa: ARG001
"""SDClient wired to the mocked transport."""
c = SDClient()
yield c # type: ignore[misc]
c.close()