Replace deprecated datetime.datetime.utcnow() with datetime.datetime.now(datetime.UTC) in anthropic_oauth.py
Fix session_mgr.save mock: use MagicMock() instead of AsyncMock() since save is synchronous in production
Test plan
Run pytest — no new warnings from these two locations
Existing tests pass without changes
## Summary
- Replace deprecated `datetime.datetime.utcnow()` with `datetime.datetime.now(datetime.UTC)` in `anthropic_oauth.py`
- Fix `session_mgr.save` mock: use `MagicMock()` instead of `AsyncMock()` since `save` is synchronous in production
## Test plan
- [ ] Run `pytest` — no new warnings from these two locations
- [ ] Existing tests pass without changes
All checks were successful
Build Nanobot OAuth / build (pull_request) Successful in 45s
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
datetime.datetime.utcnow()withdatetime.datetime.now(datetime.UTC)inanthropic_oauth.pysession_mgr.savemock: useMagicMock()instead ofAsyncMock()sincesaveis synchronous in productionTest plan
pytest— no new warnings from these two locationsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.