Skip to content

test: add API tests for alerts endpoint - #138

Open
Hrugved-06 wants to merge 1 commit into
alimaandev:mainfrom
Hrugved-06:test-alerts-endpoint
Open

test: add API tests for alerts endpoint#138
Hrugved-06 wants to merge 1 commit into
alimaandev:mainfrom
Hrugved-06:test-alerts-endpoint

Conversation

@Hrugved-06

Copy link
Copy Markdown

Description

Adds API test coverage for the /api/v1/alerts endpoint.

The tests cover:

  • Successful authenticated request returning HTTP 200 with an alerts list.
  • Unauthorized request without a valid API key returning HTTP 401.
  • Empty alerts store returning an empty list without an error.

Closes #111

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Performance improvement
  • CI / tooling

Checklist

  • Code follows the project's coding guidelines
  • python -m pytest tests/ passes
  • cd desktop && npx tsc --noEmit passes
  • cd desktop && npm run build succeeds
  • Docs updated if needed (README, CONTRIBUTING, etc.)
  • No new warnings or lint errors

Testing

Added a TestAlerts test class in tests/test_api_server.py.

All API server tests pass successfully:

56 passed

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.

Add API tests for the alerts endpoint

1 participant