def METHOD_NAME(self):
    hostdict = paramiko.HostKeys("hostfile.temp")
    target = "happy.example.com"
    hostdict[target]  # will KeyError if not present
    del hostdict[target]
    try:
        hostdict[target]
    except KeyError:
        pass  # Good
    else:
        assert False, "Entry was not deleted from HostKeys on delitem!"