@pytest.fixture(autouse=True)
def fake_dns(monkeypatch):
 dns = FakeDNS()
 monkeypatch.setattr('qutebrowser.utils.urlutils.QHostInfo.fromName', dns.fromname_mock)
 return dns

@ pytest . fixture ( autouse = True ) def fake_dns ( monkeypatch ) : dns = FakeDNS ( ) monkeypatch . setattr ( 'qutebrowser.utils.urlutils.QHostInfo.fromName' , dns . fromname_mock ) return dns
patched qhostinfo .