Merge lp:~mandel/ubuntu-sso-client/use-new-dev-tools into lp:ubuntu-sso-client

Proposed by Manuel de la Peña on 2012-04-26
Status: Merged
Approved by: dobey on 2012-04-27
Approved revision: 953
Merged at revision: 951
Proposed branch: lp:~mandel/ubuntu-sso-client/use-new-dev-tools
Merge into: lp:ubuntu-sso-client
Diff against target: 69 lines (+9/-8)
2 files modified
ubuntu_sso/utils/tests/test_ipc.py (+8/-7)
ubuntu_sso/utils/webclient/tests/test_timestamp.py (+1/-1)
To merge this branch: bzr merge lp:~mandel/ubuntu-sso-client/use-new-dev-tools
Reviewer Review Type Date Requested Status
dobey (community) Approve on 2012-04-27
Diego Sarmentero (community) 2012-04-26 Approve on 2012-04-26
Review via email: mp+103673@code.launchpad.net

Commit Message

- Fixed tests to use the new api (LP: #988809).

Description of the Change

- Fixed tests to use the new api (LP: #988809).

If the new api has not yet landed in nightlies please add lp:~mandel/ubuntuone-dev-tools/domain-sockets to your path.

To post a comment you must log in.
953. By Manuel de la Peña on 2012-04-26

Merge with diegos fix to the timestamp issues on windows.

Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/utils/tests/test_ipc.py'
2--- ubuntu_sso/utils/tests/test_ipc.py 2012-04-18 14:30:30 +0000
3+++ ubuntu_sso/utils/tests/test_ipc.py 2012-04-26 14:12:30 +0000
4@@ -38,7 +38,7 @@
5 NoSuchMethod,
6 )
7 from ubuntuone.devtools.handlers import MementoHandler
8-from ubuntuone.devtools.testcases.txtcpserver import PbServerTestCase
9+from ubuntuone.devtools.testcases.txsocketserver import TCPPbServerTestCase
10
11 from ubuntu_sso.tests import TestCase
12 from ubuntu_sso.utils import ipc
13@@ -186,7 +186,7 @@
14 service_cmdline = DummyService.cmdline
15
16
17-class BaseIPCTestCase(PbServerTestCase, TestCase):
18+class BaseIPCTestCase(TCPPbServerTestCase, TestCase):
19 """Set the ipc to a random port for this instance."""
20
21 timeout = 5
22@@ -217,20 +217,22 @@
23 # patch server connection and client connection to ensure that
24 # we have clean connections
25
26+ @defer.inlineCallbacks
27 def server_listen(server_factory, service_name, activation_cmd,
28 port, reactor=None):
29 """Connect to the local running service."""
30- self.listen_server(self.service)
31- return defer.succeed(self.listener)
32+ yield self.listen_server(self.service)
33+ defer.returnValue(self.listener)
34
35 self.patch(ipc, 'server_listen', server_listen)
36
37+ @defer.inlineCallbacks
38 def client_connect(client_factory, service_name,
39 activation_cmdline, port, reactor=None):
40 """Connect the local running client."""
41- self.connect_client()
42+ yield self.connect_client()
43 self.client.factory = self.client_factory
44- return defer.succeed(self.connector)
45+ defer.returnValue(self.connector)
46
47 self.patch(ipc, 'client_connect', client_connect)
48
49@@ -238,7 +240,6 @@
50 yield self.service.start()
51 yield self.client.connect()
52
53- yield self.client_connected
54 # pylint: enable=E1102
55
56 @property
57
58=== modified file 'ubuntu_sso/utils/webclient/tests/test_timestamp.py'
59--- ubuntu_sso/utils/webclient/tests/test_timestamp.py 2012-04-17 20:27:18 +0000
60+++ ubuntu_sso/utils/webclient/tests/test_timestamp.py 2012-04-26 14:12:30 +0000
61@@ -71,7 +71,7 @@
62 class TimestampCheckerTestCase(TestCase):
63 """Tests for the timestamp checker."""
64
65- timeout = 1
66+ timeout = 5
67
68 @defer.inlineCallbacks
69 def setUp(self):

Subscribers

People subscribed via source and target branches