* Though FakeMainTestCase used to use self.tmpdir as homke dir, it is more correct to use a dedicated dir for that, so we can isolate home data into a dir (we may need that to debug a test).
Can you please make self.home_dir = self.mktemp('ubuntuonehacker')?
* Also, in tests/syncdaemon/test_action_queue.py you're removing the patch os.environ['HOME'] = self.home, which is great, but the self.home variable should point to the same home that the base test case is using to patch the xdg_home var. So, I would guess that in BasicTestCase we need to change:
self.home = self.mktemp('home')
for
self.home = self.home_dir
(please confirm this makes sense before changing it, I did not reviewed the whole test module).
* There are several tests that are re-defining self.home_dir and re-patching xdg_home... can you please remove that? (we need to confirm they all inherit from BaseTwistedTestCase either directly or by some inheritance chain). A quick grep gives me:
* Though FakeMainTestCase used to use self.tmpdir as homke dir, it is more correct to use a dedicated dir for that, so we can isolate home data into a dir (we may need that to debug a test).
Can you please make self.home_dir = self.mktemp( 'ubuntuonehacke r')?
* Also, in tests/syncdaemo n/test_ action_ queue.py you're removing the patch os.environ['HOME'] = self.home, which is great, but the self.home variable should point to the same home that the base test case is using to patch the xdg_home var. So, I would guess that in BasicTestCase we need to change:
self.home = self.mktemp('home')
for
self.home = self.home_dir
(please confirm this makes sense before changing it, I did not reviewed the whole test module).
* There are several tests that are re-defining self.home_dir and re-patching xdg_home... can you please remove that? (we need to confirm they all inherit from BaseTwistedTestCase either directly or by some inheritance chain). A quick grep gives me:
nessita@ dali:~/ canonical/ client/ review_ fix-user- home-tests$ grep -rn --color "patch.*xdg_home" * testing/ testcase. py:383: self.patch( platform, "xdg_home", self.home_dir) n/test_ localrescan. py:134: self.patch( platform, 'xdg_home', self.home_dir) n/test_ localrescan. py:374: self.patch( platform, 'xdg_home', self.home_dir) n/test_ localrescan. py:2021: self.patch( platform, 'xdg_home', self.home_dir) n/test_ localrescan. py:2260: self.patch( platform, 'xdg_home', self.home_dir) n/test_ config. py:534: self.patch( platform, 'xdg_home', homedir) n/test_ main.py: 267: self.patch( main_mod, "xdg_home", self.home_dir) n/test_ eq_inotify. py:664: self.patch( platform, 'xdg_home', self.home_dir) test_os_ helper. py:95: self.patch( platform, "xdg_home", self.my_home) dali:~/ canonical/ client/ review_ fix-user- home-tests$
contrib/
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/platform/
nessita@
nessita@ dali:~/ canonical/ client/ review_ fix-user- home-tests$ grep -rn --color "self\.home_dir =" * testing/ testcase. py:382: self.home_dir = self.tmpdir n/test_ vm.py:3739: self.home_dir = self.mktemp( 'ubuntuonehacke r') n/test_ localrescan. py:126: self.home_dir = self.mktemp( 'ubuntuonehacke r') n/test_ eventqueue. py:46: self.home_dir = self.mktemp( 'home_dir' ) n/test_ eq_inotify. py:649: self.home_dir = self.mktemp( 'ubuntuonehacke r') linux/test_ vm.py:464: self.home_dir = os.path. join(self. tmpdir, 'home', 'ubuntuonehacker') linux/test_ filesystem_ notifications. py:102: self.home_dir = self.mktemp( 'home_dir' ) test_filesystem _notifications. py:102: self.home_dir = self.mktemp( 'home_dir' ) dali:~/ canonical/ client/ review_ fix-user- home-tests$
contrib/
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/syncdaemo
tests/platform/
tests/platform/
tests/platform/
nessita@