Merge lp:~dobey/ubuntuone-client/fix-home-patch into lp:ubuntuone-client

Proposed by dobey on 2012-08-16
Status: Merged
Approved by: Roberto Alsina on 2012-08-16
Approved revision: 1291
Merged at revision: 1291
Proposed branch: lp:~dobey/ubuntuone-client/fix-home-patch
Merge into: lp:ubuntuone-client
Diff against target: 24 lines (+5/-3)
1 file modified
contrib/testing/testcase.py (+5/-3)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-home-patch
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve on 2012-08-16
Brian Curtin (community) 2012-08-16 Approve on 2012-08-16
Review via email: mp+119992@code.launchpad.net

Commit Message

Move the patching of user_home to before where it is used elsewhere in setUp

To post a comment you must log in.
review: Approve
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'contrib/testing/testcase.py'
2--- contrib/testing/testcase.py 2012-08-13 14:34:36 +0000
3+++ contrib/testing/testcase.py 2012-08-16 17:44:22 +0000
4@@ -391,6 +391,11 @@
5 def setUp(self):
6 yield super(BaseTwistedTestCase, self).setUp()
7 self.__root = None
8+
9+ # Patch the user home
10+ self.home_dir = self.mktemp('ubuntuonehacker')
11+ self.patch(platform, "user_home", self.home_dir)
12+
13 # use the config from the branch
14 new_get_config_files = lambda: [os.path.join(os.environ['ROOTDIR'],
15 'data', 'syncdaemon.conf')]
16@@ -411,9 +416,6 @@
17 self.log = logging.getLogger("ubuntuone.SyncDaemon.TEST")
18 self.log.info("starting test %s.%s", self.__class__.__name__,
19 self._testMethodName)
20- # Patch the user home
21- self.home_dir = self.mktemp('ubuntuonehacker')
22- self.patch(platform, "user_home", self.home_dir)
23 self.patch(action_queue.tunnel_runner, "TunnelRunner",
24 self.tunnel_runner_class)
25

Subscribers

People subscribed via source and target branches