Skip to content

Comments

fix(positioner box): include username in scan queue request#1000

Open
wakonig wants to merge 1 commit intomainfrom
fix/user_scoped_requests
Open

fix(positioner box): include username in scan queue request#1000
wakonig wants to merge 1 commit intomainfrom
fix/user_scoped_requests

Conversation

@wakonig
Copy link
Member

@wakonig wakonig commented Jan 8, 2026

Description

Minor patch for compatibility with user-scope scan queue requests, cf. bec-project/bec#725

Definition of Done

  • Documentation is up-to-date.

Copilot AI review requested due to automatic review settings January 8, 2026 18:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the scan_queue_request API call to include the username parameter, aligning with changes in the upstream BEC library (PR #725) to support user-scoped scan queue requests.

  • Updated _stop_device method to pass self.client.username to MessageEndpoints.scan_queue_request()
  • Updated corresponding unit test to verify the username parameter is correctly passed

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
bec_widgets/widgets/control/device_control/positioner_box/_base/positioner_box_base.py Modified the _stop_device method to include self.client.username parameter in the scan queue request call
tests/unit_tests/test_positioner_box.py Updated test assertion to verify the username parameter is correctly passed to the scan queue request endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +101 to +103
mock_send.assert_called_once_with(
MessageEndpoints.scan_queue_request(positioner_box.client.username), msg
)
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mocked_client used in this test does not explicitly set a username attribute. While MagicMock will auto-generate it, consider adding an explicit username to the mocked_client fixture to make the test more realistic and ensure it properly validates the username parameter is being passed correctly.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant