Merge lp:~alecu/ubuntu-sso-client/proxy-integration-tests into lp:ubuntu-sso-client
| Status: | Merged | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Approved by: | Alejandro J. Cura on 2012-01-11 | ||||||||||||||||||||
| Approved revision: | 838 | ||||||||||||||||||||
| Merged at revision: | 831 | ||||||||||||||||||||
| Proposed branch: | lp:~alecu/ubuntu-sso-client/proxy-integration-tests | ||||||||||||||||||||
| Merge into: | lp:ubuntu-sso-client | ||||||||||||||||||||
| Diff against target: |
726 lines (+419/-30) 8 files modified
ubuntu_sso/utils/webclient/common.py (+14/-3) ubuntu_sso/utils/webclient/gsettings.py (+63/-0) ubuntu_sso/utils/webclient/libsoup.py (+32/-4) ubuntu_sso/utils/webclient/qtnetwork.py (+32/-4) ubuntu_sso/utils/webclient/tests/test_gsettings.py (+131/-0) ubuntu_sso/utils/webclient/tests/test_webclient.py (+88/-16) ubuntu_sso/utils/webclient/tests/webclient_demo.py (+51/-0) ubuntu_sso/utils/webclient/txweb.py (+8/-3) |
||||||||||||||||||||
| To merge this branch: | bzr merge lp:~alecu/ubuntu-sso-client/proxy-integration-tests | ||||||||||||||||||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Manuel de la Peña (community) | 2012-01-04 | Approve on 2012-01-11 | |
| Natalia Bidart | 2012-01-04 | Approve on 2012-01-11 | |
|
Review via email:
|
|||
Description of the Change
Proxy aware webclient with QtNetwork and libsoup backends, and integration tests. (LP: #884963 LP: #884968 LP: #884970 LP: #884971)
This branch also forces the webclient to take unicode IRIs (instead of ascii URIs) (LP: #911844)
NOTE: this branch needs the squid support in this branch:
* lp:~mandel/ubuntuone-dev-tools/proxy-testcase
| Alejandro J. Cura (alecu) wrote : | # |
| Natalia Bidart (nataliabidart) wrote : | # |
I have this PEP8 issue:
./ubuntu_
| Manuel de la Peña (mandel) wrote : | # |
With squid3 the tests won't pass. The solution to this is to make the MockServer timeout the connection that the proxy has. Please take a look at ubuntuone-dev-tools for an example.
| Alejandro J. Cura (alecu) wrote : | # |
> I have this PEP8 issue:
>
> ./ubuntu_
> before ')'
I can't reproduce that in my Precise installation.
Anyway, I'm rewritting that bit of code so it looks better.
- 836. By Alejandro J. Cura on 2012-01-09
-
Forcefully disconnect squid3 that uses HTTP/1.1 and lint fixes
| Manuel de la Peña (mandel) wrote : | # |
I dont understand why GSETTINGS_CMDLINE is stored as a single string if you are going to do .split() with it. Isn't it more clear to store it as it will be used?
| Alejandro J. Cura (alecu) wrote : | # |
> I dont understand why GSETTINGS_CMDLINE is stored as a single string if you
> are going to do .split() with it. Isn't it more clear to store it as it will
> be used?
I think it's more clear to store it as just a string; to me using a list of strings for this adds noise to the code.
Also, if we ever need to change that cmdline it's easier to change it this way.
| Natalia Bidart (nataliabidart) wrote : | # |
Module docstring for ubuntu_
"""A webclient backend that uses QtNetwork."""
I would guess this is a copy&paste typo?
- 837. By Alejandro J. Cura on 2012-01-10
-
fix for a docstring
| Natalia Bidart (nataliabidart) wrote : | # |
So, I ran the suite in windows and I'm getting:
ubuntu_
WebClientTestCase
test_get_iri ... Traceback (most recent call last):
Failure: twisted.
test_webclient.
unning at 8.0 secs
[ERROR]
test_
Failure: twisted.
test_webclient.
ror) still running at 8.0 secs
[ERROR]
test_
Failure: twisted.
DelayedCalls: (set twisted.
<DelayedCall 0x425ea08 [0.22000002861s] called=0 cancelled=0 SaveSite._updateLog
DateTime()>
<DelayedCall 0x425eaf8 [5.21399998665s] called=0 cancelled=0 onTimeout(<Deferred
at 0x425ea30>)>
[ERROR]
Traceback (most recent call last):
Failure: twisted.
Selectables:
<<class 'twisted.
bclient.SaveSite on 50543>
[ERROR]
| Alejandro J. Cura (alecu) wrote : | # |
I tried increasing the test timeout on that TestCase, from 8 to 28, and now all tests pass.
I don't think it's a clean solution, so tomorrow I'll be looking for a better solution.
- 838. By Alejandro J. Cura on 2012-01-11
-
127.0.0.1 instead of localhost, because tests on windows timeout before resolving
| Manuel de la Peña (mandel) wrote : | # |
Ran the tests on Ubuntu P and Windows 7, all pass as expected. Code looks great.

Proxy aware webclient with QtNetwork and libsoup backends, and integration tests. (LP: #884963 LP: #884968 LP: #884970 LP: #884971)