This commit is contained in:
29
tests/conftest.py
Normal file
29
tests/conftest.py
Normal file
@@ -0,0 +1,29 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user