test: format the mocked token and cast the tell-state stand-in for basedpyright
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Canceled after 33s
CI / test (3.12) (pull_request) Canceled after 33s
CI / test (3.13) (pull_request) Canceled after 28s
CI / test (3.14) (pull_request) Canceled after 28s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Canceled after 23s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Canceled after 23s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 18s
CI / test-with-coverage (pull_request) Canceled after 18s
CI / coverage-analysis (pull_request) Canceled after 0s
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Canceled after 33s
CI / test (3.12) (pull_request) Canceled after 33s
CI / test (3.13) (pull_request) Canceled after 28s
CI / test (3.14) (pull_request) Canceled after 28s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Canceled after 23s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Canceled after 23s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 18s
CI / test-with-coverage (pull_request) Canceled after 18s
CI / coverage-analysis (pull_request) Canceled after 0s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -54,12 +54,16 @@ def test_auto_centering_flag_overrides_alignment_gate():
|
||||
|
||||
def test_robot_cooling_is_the_only_blue_busy_state():
|
||||
from types import SimpleNamespace
|
||||
from typing import cast
|
||||
|
||||
from aarecommon.models.tell import TellStateModel
|
||||
|
||||
from aare.gui.styles import BUSY_BLUE, BUSY_PSI_RED
|
||||
|
||||
def _style(activity: str):
|
||||
tell = SimpleNamespace(activity=SimpleNamespace(value=activity))
|
||||
style = build_busy_overlay_style(is_busy=True, tell_state=tell) # type: ignore[arg-type]
|
||||
# Only .activity.value is read; cast keeps basedpyright off the stand-in.
|
||||
tell = cast(TellStateModel, SimpleNamespace(activity=SimpleNamespace(value=activity)))
|
||||
style = build_busy_overlay_style(is_busy=True, tell_state=tell)
|
||||
assert style is not None
|
||||
return style
|
||||
|
||||
|
||||
@@ -619,7 +619,12 @@ def test_sample_camera_frame_paints_visible_views_and_acks(qtbot, mock_ui_state,
|
||||
patch("aare.gui.main_window.JFJochDBusClient"),
|
||||
patch("aare.gui.main_window.jwt.decode") as mock_jwt,
|
||||
):
|
||||
mock_jwt.return_value = {"sub": "testuser", "staff": True, "pgroups": ["p123"], "session": 15}
|
||||
mock_jwt.return_value = {
|
||||
"sub": "testuser",
|
||||
"staff": True,
|
||||
"pgroups": ["p123"],
|
||||
"session": 15,
|
||||
}
|
||||
win = _make_window(qtbot)
|
||||
|
||||
views = (win.sample_camera, win.compact_sample_camera, win.portrait_sample_camera)
|
||||
|
||||
Reference in New Issue
Block a user