Merge lp:~dobey/ubuntuone-control-panel/update-13-10 into lp:ubuntuone-control-panel/stable-13-10

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: no longer in the source branch.
Merged at revision: 402
Proposed branch: lp:~dobey/ubuntuone-control-panel/update-13-10
Merge into: lp:ubuntuone-control-panel/stable-13-10
Diff against target: 56 lines (+9/-8)
3 files modified
setup.py (+2/-7)
ubuntuone/controlpanel/tests/test_backend.py (+1/-1)
ubuntuone/controlpanel/tests/test_web_client.py (+6/-0)
To merge this branch: bzr merge lp:~dobey/ubuntuone-control-panel/update-13-10
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Review via email: mp+166902@code.launchpad.net

Commit message

[Alejandro J. Cura]

    - Force a fake timestamp for the webclient tests (LP:#1186294).

[Rodney Dawes]

    - Fix pep8 warning.

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) :
review: Approve
402. By Alejandro J. Cura

[Alejandro J. Cura]

    - Force a fake timestamp for the webclient tests (LP:#1186294).

[Rodney Dawes]

    - Fix pep8 warning.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2012-11-30 21:03:28 +0000
3+++ setup.py 2013-05-31 21:30:15 +0000
4@@ -1,11 +1,6 @@
5 #!/usr/bin/env python
6-# setup.py - Build system for Ubuntu One Control Panel package
7-#
8-# Authors: Natalia B. Bidart <natalia.bidart@canonical.com>
9-# Manuel de la Pena <manuel@canonical.com>
10-# Alejandro J. Cura <alecu@canonical.com>
11-#
12-# Copyright 2010-2011 Canonical Ltd.
13+#
14+# Copyright 2010-2013 Canonical Ltd.
15 #
16 # This program is free software: you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License version 3, as published
18
19=== modified file 'ubuntuone/controlpanel/tests/test_backend.py'
20--- ubuntuone/controlpanel/tests/test_backend.py 2013-02-22 19:54:41 +0000
21+++ ubuntuone/controlpanel/tests/test_backend.py 2013-05-31 21:30:15 +0000
22@@ -977,7 +977,7 @@
23 username = share['other_visible_name']
24 if not username:
25 username = share['other_username'] + \
26- ' (%s)' % self.be.NAME_NOT_SET
27+ ' (%s)' % self.be.NAME_NOT_SET
28
29 shares[username].append(share)
30
31
32=== modified file 'ubuntuone/controlpanel/tests/test_web_client.py'
33--- ubuntuone/controlpanel/tests/test_web_client.py 2013-02-22 19:54:41 +0000
34+++ ubuntuone/controlpanel/tests/test_web_client.py 2013-05-31 21:30:15 +0000
35@@ -52,6 +52,7 @@
36 'oauth_signature_method=HMAC-SHA1&next=%%2Fblah&oauth_version=1.0&' \
37 'oauth_token=%s&oauth_signature=s6h0LRBiWchTADrTJWaJUSuaGpo3D' % \
38 (SAMPLE_CREDENTIALS['consumer_key'], SAMPLE_CREDENTIALS['token'])
39+FAKE_TIMESTAMP = 1
40
41
42 def sample_get_credentials():
43@@ -108,8 +109,13 @@
44 self.base_iri = self.ws.get_iri()
45
46 self.wc = WebClient(sample_get_credentials, base_url=self.base_iri)
47+ self.patch(self.wc.wc, "get_timestamp", self.fake_get_timestamp)
48 self.addCleanup(self.wc.shutdown)
49
50+ def fake_get_timestamp(self):
51+ """A fake get_timestamp."""
52+ return defer.succeed(FAKE_TIMESTAMP)
53+
54 def test_correct_app_name(self):
55 """Assert that the wc uses the correct appname."""
56 self.assertEqual(APP_NAME, self.wc.wc.appname)

Subscribers

People subscribed via source and target branches

to all changes: