Refactor #93
closedMake @auth_required testable and write a few examples
100%
Description
This is a task related to the Django conversion work. Currently the testing methodology expects to make assertions about the decorators that are present over each Django URL handler. The decorator currently is not able to be tested without a large number of mock gymnastics. bmbouter has prototyped an adjustment to the decorator whereby the decorators itself calls an external function which can be mocked directly instead of mocking all calls the decorated function calls out to. This works around the central difficulty that decorated functions are stored in a closure and are not able to be mocked directly.
This task is to convert that prototype into production-grade code which includes:
1. Writing a generic replacement function that accepts test-driven assertion values about which permissions should be present when the decorator is called.
2. Use the helper function from (1) to add the desired assertion functionality to some actual Django URL handlers (to provide examples of usage for others).
3. Review the code once more to ensure there are no side effects and that we're good to go.
Updated by amacdona@redhat.com about 9 years ago
- Status changed from NEW to ASSIGNED
Updated by bmbouter about 9 years ago
- Status changed from ASSIGNED to POST
- % Done changed from 0 to 90
PR available at: https://github.com/pulp/pulp/pull/1530
Updated by bmbouter about 9 years ago
This has been merged into the feature branch 'introducing-django' on pulp/pulp, but we need to leave this at POST until the feature branch is merged back into master. This is planned to be done near the end of the Jan 2015 at which point this can be moved to modified.
Updated by bmbouter about 9 years ago
- Status changed from POST to MODIFIED
Merged to the feature branch 'introducing-django' then to master.
Updated by bmbouter about 9 years ago
- Status changed from MODIFIED to 7
- % Done changed from 90 to 100
Updated by bmbouter about 9 years ago
- Status changed from 7 to MODIFIED
- Platform Release set to master
Updated by rbarlow almost 9 years ago
- Platform Release changed from master to 2.7.0
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from MODIFIED to 5
Updated by rbarlow about 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE