test: add 23 unit tests for provider endpoints

Cover all 9 endpoints in providers.py:
- Provider presets (list all, get by ID, not found)
- Gmail credential CRUD (create, update, get, delete)
- Import labels update
- Gmail authorize URL (success, not configured)
- Debug email (success, no credentials, injection failure)
- OAuth callback (new/update cred, not configured, token exchange
  failure, missing access token, verification failure)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-29 00:45:50 +00:00
parent 65318b8c1b
commit 4d1451ecde
3 changed files with 711 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Unit tests for provider endpoints (`test_providers.py`): 23 tests covering provider presets, Gmail credential CRUD, import labels, authorize URL, debug email, and OAuth callback
- Unit tests for mail account endpoints (`test_mail_accounts.py`): 30 tests covering CRUD, toggle, pull-now, test connection, auto-detect, processing runs, and processing logs
- Unit tests for authentication endpoints (`test_auth.py`): 22 tests covering register, login, Google OAuth, authorize-url, and helper functions