Merge lp:~diegosarmentero/ubuntu-sso-client/reset-error into lp:ubuntu-sso-client
| Status: | Merged |
|---|---|
| Approved by: | Diego Sarmentero on 2012-03-26 |
| Approved revision: | 937 |
| Merged at revision: | 935 |
| Proposed branch: | lp:~diegosarmentero/ubuntu-sso-client/reset-error |
| Merge into: | lp:ubuntu-sso-client |
| Diff against target: |
55 lines (+22/-1) 3 files modified
ubuntu_sso/main/tests/test_common.py (+12/-0) ubuntu_sso/utils/webclient/qtnetwork.py (+2/-1) ubuntu_sso/utils/webclient/tests/test_webclient.py (+8/-0) |
| To merge this branch: | bzr merge lp:~diegosarmentero/ubuntu-sso-client/reset-error |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Roberto Alsina (community) | Approve on 2012-03-26 | ||
| Natalia Bidart | 2012-03-23 | Approve on 2012-03-26 | |
|
Review via email:
|
|||
Commit Message
- Converting to unicode some data returned by webclient in QByteArray format (LP: 961315).
- 933. By Diego Sarmentero on 2012-03-23
-
Improving tests.
- 934. By Diego Sarmentero on 2012-03-23
-
Tests fixed.
- 935. By Diego Sarmentero on 2012-03-23
-
merge
| Natalia Bidart (nataliabidart) wrote : | # |
A couple of minor neat picks:
* the 'pass' sentence in the MyException class is not needed
* the docstring for test_webcliente
* the way to test this:
try:
yield self.wc.
except Exception, e:
for error in e.args:
like I mentioned over IRC, is:
deferred = self.wc.
failure = yield self.assertFail
# do the asserts over failure (failure.value has the real exception)
- 936. By Diego Sarmentero on 2012-03-26
-
Minor fixes.
| Diego Sarmentero (diegosarmentero) wrote : | # |
> A couple of minor neat picks:
>
> * the 'pass' sentence in the MyException class is not needed
>
> * the docstring for test_webcliente
> are bytes." but your code makes the content unicode, not bytes...
>
> * the way to test this:
>
> try:
> yield self.wc.
> except Exception, e:
> for error in e.args:
> self.assertTrue
>
> like I mentioned over IRC, is:
>
> deferred = self.wc.
> failure = yield self.assertFail
> # do the asserts over failure (failure.value has the real exception)
Fixed!
- 937. By Diego Sarmentero on 2012-03-26
-
removing unnecessary variable.

The fix applied to account.py should be applied to the webclient module instead, since despite we're ensuring having unicode for NewPasswordError, we may leak QBytes from other calls, into other exceptions or results, and that's not good.
So, unless is not doable and I'm missing something (please advice), this branch needs to address that, providing a test for the webclient module ensuring that no qt types are leaked.
Thanks!