Merge lp://qastaging/~rvb/maas/oauth-retry-bug-1435767 into lp://qastaging/~maas-committers/maas/trunk

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: no longer in the source branch.
Merged at revision: 3760
Proposed branch: lp://qastaging/~rvb/maas/oauth-retry-bug-1435767
Merge into: lp://qastaging/~maas-committers/maas/trunk
Diff against target: 186 lines (+106/-5)
2 files modified
src/maasserver/utils/tests/test_views.py (+90/-5)
src/maasserver/utils/views.py (+16/-0)
To merge this branch: bzr merge lp://qastaging/~rvb/maas/oauth-retry-bug-1435767
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+255063@code.qastaging.launchpad.net

Commit message

Delete the nonce before retrying requests.

Description of the change

- I've used the oauth_request.get_parameter() methods in delete_oauth_nonce instead of using the similar methods that return the Consumer and the Token object in order to minimize the number of database queries: the only thing we're interested in here is the Nonce object.

- I realize the testing done in test__get_response_deleted_nonces_across_requests is a bit fragile because it assumes a lot of stuff about the internals but that's the best I could come up with in a testing environment.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

Cool.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.