Skip to content
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: delete allowance #301

Merged
merged 2 commits into from
Jul 31, 2024
Merged

feat: delete allowance #301

merged 2 commits into from
Jul 31, 2024

Conversation

zacharis278
Copy link
Contributor

JIRA: COSMO-395 (2u-internal)

Description: Endpoint to delete allowances

Note I also added an authorization check to the post endpoint. We authorize the user against the course id passed into the view so we should only ever allow them to create/modify/delete allowances for exams in that course.

Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  edx_exams/apps/api/v1
  views.py
  edx_exams/apps/api/v1/tests
  test_views.py
  edx_exams/apps/core
  constants.py
Project Total  

This report was generated by python-coverage-comment-action

@zacharis278 zacharis278 force-pushed the zhancock/delete-allowance branch 2 times, most recently from 3f11790 to 6eaea58 Compare July 31, 2024 15:33
@zacharis278 zacharis278 force-pushed the zhancock/delete-allowance branch from 6eaea58 to f9d0216 Compare July 31, 2024 15:39
Copy link
Member

@schenedx schenedx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@varshamenon4 varshamenon4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@@ -1878,6 +1880,38 @@ def test_get_empty_response(self):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.data, [])

def test_delete(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test cases!

@zacharis278 zacharis278 merged commit 7038a68 into main Jul 31, 2024
5 checks passed
@zacharis278 zacharis278 deleted the zhancock/delete-allowance branch July 31, 2024 16:36
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.

3 participants