Merge lp:~elachuni/canonical-identity-provider/ssoclient-tests into lp:~elachuni/canonical-identity-provider/ssoclient
Status: | Merged |
---|---|
Approved by: | Anthony Lenton |
Approved revision: | 7 |
Merged at revision: | 5 |
Proposed branch: | lp:~elachuni/canonical-identity-provider/ssoclient-tests |
Merge into: | lp:~elachuni/canonical-identity-provider/ssoclient |
Diff against target: |
350 lines (+217/-30) 2 files modified
ssoclient.py (+33/-24) tests/test_ssoclient.py (+184/-6) |
To merge this branch: | bzr merge lp:~elachuni/canonical-identity-provider/ssoclient-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Owen (community) | Approve | ||
Anthony Lenton | Pending | ||
Review via email: mp+68303@code.launchpad.net |
Commit message
Added missing tests for all api calls.
Description of the change
Overview
========
This branch adds tests for all api calls that were missing tests in SingleSignOnAPI, and fixes the issues that these tests found.
Details
=======
Tests are written against SSO's mock server, you'll need to have that installed in your PYTHONPATH for the tests to work. Making running the tests easier would be something fo an interesting follow-up branch.
The issues that the tests uncovered were mainly two kinds:
- Methods that were using POST that should use GET instead.
- Once the method was switched over to GET, query arguments needed to be manually json-encoded. json_encode_query() was added to make this easier.
To Test
=======
Make SSO's mockserver, piston_mini_client 0.4, httplib2 0.6.0 and wsgi_intercept available on your pythonpath, and then run:
python setup.py test
When you say that some methods should be GET instead of POST, is that to match what the lazr.restful server expected, or something else?