'Patch \'open\' in verifyHostKey.'

def setUp(self):

    self.fakeFile = FakeFile()
    self.patch(default, '_open', self.patchedOpen)
    self.hostsOption = self.mktemp()
    self.hashedEntries = {}
    knownHostsFile = KnownHostsFile(FilePath(self.hostsOption))
    for host in ('exists.example.com', '4.3.2.1'):
        entry = knownHostsFile.addHostKey(host, Key.fromString(sampleKey))
        self.hashedEntries[host] = entry
    knownHostsFile.save()
    self.fakeTransport = FakeObject()
    self.fakeTransport.factory = FakeObject()
    self.options = self.fakeTransport.factory.options = {'host': 'exists.example.com', 'known-hosts': self.hostsOption}
