Code review comment for lp:~leonardr/launchpadlib/trusted-workflow-tests

Revision history for this message
Leonard Richardson (leonardr) wrote :

This branch does some refactoring and adds some more tests for the RequestTokenAuthorizationEngine, the core of any trusted request token authorization client other than the end-user's web browser.

1. The class itself is renamed from AuthorizeRequestTokenProcess to RequestTokenAuthorizationEngine. RTAE is not the best name but I found ARTP really confusing.

2. RTAE no longer overwrites 'allow_access_levels' after it gets the token information. This lets me use the same RTAE object twice in tests.

3. Added code to detect when Launchpad doesn't recognize the request token.

4. Gave default implementations for a lot of the RTAE plugin methods, which just print the suggested_message. I already defined this code in the ScriptableRequestTokenAuthorization test helper, and I don't want to define it again for the command-line client.

5. Added tests for trying to approve a token that was already approved, trying to approve a nonexistent token, and triggering a server error.

« Back to merge proposal