DiamondLightSource / DiamondLightSource/blueapi
Simplify Access Token Injection for BlueAPI Client in System Tests
- Dominant language
- Python
- Stars
- 13
- Forks
- 13
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 25
Description
Currently, in the system tests, we patch the blueapi client and manually inject the access token as a side effect. This approach is not ideal, as it adds complexity and reduces clarity in the test setup.
Reference:
https://github.com/DiamondLightSource/htss-rig-bluesky/blob/main/tests/system_tests/conftest.py#L79
We should introduce a clean and simple mechanism to add the access token directly, without requiring a login or patching the client.
## Acceptance Criteria
- The blueapi client can accept an access token directly via a simple, public interface—no patching required in system tests.
- The code in the system tests is refactored to use this mechanism, improving clarity and maintainability.
- The existing functionality remains unchanged and is not broken by this update.
Contributor guide
Assessment
This issue has not been assessed yet.