Fix monkeypatch

This commit is contained in:
Florian Bruhin 2017-03-01 12:12:40 +01:00
parent ca4f249c30
commit 5d0c9440f6

View File

@ -833,7 +833,7 @@ def test_long_username(monkeypatch):
"""See https://github.com/qutebrowser/qutebrowser/issues/888."""
username = 'alexandercogneau'
basedir = '/this_is_a_long_basedir'
monkeypatch.setattr(ipc.standarddir.getpass, 'getuser', lambda: username)
monkeypatch.setattr('getpass.getuser', lambda: username)
name = ipc._get_socketname(basedir=basedir)
server = ipc.IPCServer(name)
expected_md5 = md5('{}-{}'.format(username, basedir))