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

Submission lock tests #1716

Merged
merged 23 commits into from
Nov 1, 2021

Conversation

nsprenkle
Copy link
Contributor

@nsprenkle nsprenkle commented Oct 26, 2021

TL;DR - Add tests for submission locking XBlock handlers

JIRA: AU-345

What changed?

  • Added tests.
  • Updated submission lock timestamp to be timezone aware.
  • Added logic to allow a lock owner to re-claim an existing lock, updating the timeout.
  • Added handling to check whether a submission UUID is valid (only for claiming a new submission lock).

Developer Checklist

Testing Instructions

Python test suites should pass.

Reviewer Checklist

Collectively, these should be completed by reviewers of this PR:

  • I've done a visual code review
  • I've tested the new functionality

FYI: @edx/masters-devs-gta

@nsprenkle nsprenkle requested a review from a team as a code owner October 26, 2021 17:55
Copy link
Contributor

@jansenk jansenk left a comment

Choose a reason for hiding this comment

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

Looks good. A cleanup suggestion in your views and a test suggestion

@nsprenkle nsprenkle force-pushed the nsprenkle/submission-lock-tests branch from f7d167c to 9e8811a Compare October 28, 2021 21:12
@jansenk jansenk self-requested a review November 1, 2021 13:41
Copy link
Contributor

@jansenk jansenk left a comment

Choose a reason for hiding this comment

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

do a django migration squash and I'd say this is g2g

@jansenk
Copy link
Contributor

jansenk commented Nov 1, 2021

Or, you probably don't have to do a migration squash. just delete your migrations and re-generate the one

@nsprenkle nsprenkle merged commit c6596db into feature/ora_staff_grader Nov 1, 2021
@nsprenkle nsprenkle deleted the nsprenkle/submission-lock-tests branch November 1, 2021 19:33
jansenk added a commit that referenced this pull request Dec 7, 2021
* test: add tests for submission locking

* refactor: update submission lock for timezone support

* feat: allow a user to reacquire a submission lock

* feat: add submission validation to submission lock

* feat: add xblock test mode for returning response

In a test using the XBlockHandlerTestCaseMixin, running self.request
with response_format='response' returns the entire response object
instead of just the body. This is useful for asserts on status code

Co-authored-by: jansenk <jkantor@edx.org>
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.

None yet

2 participants