30 lines
584 B
Python
30 lines
584 B
Python
import base64
|
|
|
|
import pytest
|
|
|
|
from server.main import manager
|
|
|
|
|
|
@pytest.fixture
|
|
def fake_screenshot() -> str:
|
|
"""Return a reproducible base64 string representing a dummy screenshot."""
|
|
return base64.b64encode(b"clickthrough-dummy").decode()
|
|
|
|
|
|
@pytest.fixture
|
|
def default_grid_request(fake_screenshot):
|
|
return {
|
|
"width": 640,
|
|
"height": 480,
|
|
"screenshot_base64": fake_screenshot,
|
|
"rows": 3,
|
|
"columns": 3,
|
|
}
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def reset_manager_state():
|
|
manager._grids.clear()
|
|
yield
|
|
manager._grids.clear()
|