Merge lp:~canonical-isd-hackers/canonical-identity-provider/fix-captcha-tests-on-py2.7 into lp:canonical-identity-provider/release
Proposed by
Łukasz Czyżykowski
Status: | Merged |
---|---|
Approved by: | Ricardo Kirkner |
Approved revision: | no longer in the source branch. |
Merged at revision: | 166 |
Proposed branch: | lp:~canonical-isd-hackers/canonical-identity-provider/fix-captcha-tests-on-py2.7 |
Merge into: | lp:canonical-identity-provider/release |
Diff against target: |
109 lines (+32/-33) 1 file modified
identityprovider/tests/test_captcha.py (+32/-33) |
To merge this branch: | bzr merge lp:~canonical-isd-hackers/canonical-identity-provider/fix-captcha-tests-on-py2.7 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ricardo Kirkner (community) | Approve | ||
Review via email: mp+65518@code.launchpad.net |
Commit message
Fix for captcha tests in python 2.7.
Description of the change
Overview
========
This branch fixes test case for captcha which was failing on python 2.7.
Details
=======
Because of changes in the deepcopy in the python 2.7, the way in which the settings were saved for each test is no longer works. Because of that there's new approach, based on context manager (I could swear that there was something similar somewhere in our codebase) was created.
Testing
=======
To test run:
$ fab bootstrap setup_postgresq
Making sure that you're using python 2.7.
To post a comment you must log in.
The context manager patch_settings is provided with isd-test-utils, you *could* depend on it, but since it's just the context manager you need, and that the namespace of that package will change (soon?), it's ok to duplicate this code now (as you would be depending on yet another library just for it).
Lines 84-86 need some attention though:
l. 84, I think this could go before the patch_settings call
l. 85-86 these are not really needed
Thanks for making the bootstrap work on python2.7 :)