-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maint/tests #204
Maint/tests #204
Conversation
Reviewer's Guide by SourceryThis pull request focuses on improving the test suite by adding documentation on using fixtures and mocks, replacing some integration-style tests with lighter versions, and adding verified user constants. The changes aim to enhance test performance and provide guidance for writing more efficient tests. Class diagram for User and UserGroupclassDiagram
class User {
int user_id
Connection _database
List~UserGroup~ _groups
}
class UserGroup {
<<enumeration>>
ADMIN
READ_WRITE
}
User --> UserGroup : has
note for User "Represents a user with associated groups and database connection"
Class diagram for ApiKeyclassDiagram
class ApiKey {
<<enumeration>>
ADMIN
REGULAR_USER
OWNER_USER
INVALID
}
note for ApiKey "Represents different types of API keys as string enumerations"
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @PGijsbers - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider verifying that all references to ApiKey have been updated after moving it from conftest.py to users_test.py.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 3 issues found
- 🟢 Complexity: all looks good
- 🟡 Documentation: 2 issues found
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
user=owner, | ||
user_db=user_test, | ||
expdb_db=expdb_test, | ||
) | ||
|
||
|
||
@pytest.mark.skip("Not sure how to include apikey in test yet.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (testing): Skipped test remains unaddressed
This test is still skipped. Consider implementing it using the new user constants and connection fixtures, similar to the other updated tests in this file.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
=======================================
Coverage ? 92.19%
=======================================
Files ? 51
Lines ? 1844
Branches ? 144
=======================================
Hits ? 1700
Misses ? 102
Partials ? 42 ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Refactor tests to improve performance by replacing some integration tests with lighter versions and introduce verified user constants. Add documentation on using fixtures and mocks in tests to guide developers in writing efficient tests.
New Features:
Enhancements:
Documentation:
Tests: