configtypes: Add os.path.join emulation to os_mock.

This commit is contained in:
Florian Bruhin 2015-07-23 16:57:42 +02:00
parent 85e748df4f
commit eb28365d82

View File

@ -74,6 +74,7 @@ def os_mock(mocker):
m = mocker.patch('qutebrowser.config.configtypes.os', autospec=True)
m.path.expandvars.side_effect = lambda x: x.replace('$HOME', '/home/foo')
m.path.expanduser.side_effect = lambda x: x.replace('~', '/home/foo')
m.path.join.side_effect = lambda *parts: '/'.join(parts)
return m