You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the PR! The CI failed due to two issues:
Duplicate TestAlerts class - You added a new TestAlerts class, but one already exists at line 441. Please merge your new tests into the existing TestAlerts class instead of creating a duplicate.
Missing newline at end of file - The file needs a trailing newline at the end.
To fix:
Remove the duplicate class TestAlerts: definition (the one you added around line 504)
Move your three new test methods ( est_alerts_returns_list, est_alerts_requires_auth, est_alerts_empty) into the existing TestAlerts class (around line 441)
Ensure the file ends with a newline
Once fixed, the CI should pass. Let me know if you need help!
Duplicate TestAlerts class - The diff shows you're adding a new class TestAlerts: at line 446, but one already exists at line 441. You need to merge your three new test methods into the existing TestAlerts class instead of creating a duplicate.
Trailing whitespace - Line 494 has trailing whitespace: assert data["count"] == 0\n (has spaces after the newline)
To fix:
Remove the duplicate class TestAlerts: definition you added
Move your three new test methods (test_alerts_returns_list, test_alerts_requires_auth, test_alerts_empty) inside the existing TestAlerts class (around line 441, after test_alerts_list)
Remove trailing whitespace on the line assert data["count"] == 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds API test coverage for the
/api/v1/alertsendpoint.The tests cover:
Closes #111
Type of Change
Checklist
python -m pytest tests/passescd desktop && npx tsc --noEmitpassescd desktop && npm run buildsucceedsTesting
Added a
TestAlertstest class intests/test_api_server.py.All API server tests pass successfully:
56 passed