'Mock the os module and some os.path functions.'

@pytest.fixture
def os_mock(self, mocker):

    m = mocker.patch('qutebrowser.utils.urlutils.os')
    m.path.join.side_effect = (lambda *args: '/'.join(args))
    m.path.expanduser.side_effect = os.path.expanduser
    return m
