Comment 1 for bug 915380

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

All of these setting of the HOME env needs to be fixed so xdg_home returns the expected path:

nessita@dali:~/canonical/client/trunk$ grep HOME tests/
tests/syncdaemon/test_vm.py:127: old_home = os.environ['HOME']
tests/syncdaemon/test_vm.py:128: os.environ['HOME'] = self.home_dir
tests/syncdaemon/test_vm.py:129: self.addCleanup(os.environ.__setitem__, 'HOME', old_home)
tests/syncdaemon/test_localrescan.py:2266: self.ancestors = self.udf.ancestors # need a fake HOME
tests/syncdaemon/test_action_queue.py:2535: self.old_home = os.environ.get('HOME', None)
tests/syncdaemon/test_action_queue.py:2536: os.environ['HOME'] = self.home
tests/syncdaemon/test_action_queue.py:2542: os.environ.pop('HOME')
tests/syncdaemon/test_action_queue.py:2544: os.environ['HOME'] = self.old_home
tests/platform/linux/eventlog/test_zg_listener.py:376: self._old_home = os.environ['HOME']
tests/platform/linux/eventlog/test_zg_listener.py:377: os.environ['HOME'] = self.home_dir
tests/platform/linux/eventlog/test_zg_listener.py:382: os.environ['HOME'] = self._old_home

Also, ideally, we should make the xdg_home patch in a single base test case. Please analyze if this is possible, and also analyze if this can/should be done in dev tools.