-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat: Revamp the UX of exercise page #382
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -686,3 +686,15 @@ def test_solutions_of_user( | |
exercises = solution.of_user(student_user.id, from_all_courses=True) | ||
assert exercises[0].get('assessment') is None | ||
assert exercises[1].get('assessment') == 'Try again' | ||
|
||
@staticmethod | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Missing test cases for edge conditions in It would be beneficial to add test cases covering scenarios where a solution has comments, an assigned checker, and an assessment. This ensures that the summary method accurately reflects all aspects of a solution's state. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Add a test case for the new 'Invalid' assessment type. Given the addition of a new 'Invalid' assessment type in the model changes, it's important to ensure that this assessment type is correctly handled in the solution summaries. A specific test case for this scenario would validate the integration. |
||
def test_get_solution_summary(solution: Solution, staff_user: User): | ||
summary = Solution._get_summary(solution) | ||
assert summary.get('assessment') is None | ||
assert summary['solution_id'] == solution.id | ||
assert not summary['is_checked'] | ||
|
||
solution.mark_as_checked(staff_user) | ||
solution = Solution.get_by_id(solution.id) | ||
summary = Solution._get_summary(solution) | ||
assert summary['is_checked'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Consider adding more comprehensive assertions for The test currently checks if the solution is marked as checked, but it could be enhanced by verifying other fields in the summary, such as |
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.
suggestion (code-quality): Merge dictionary assignment with declaration [×3] (
merge-dict-assign
)