def patchedOpen(self, fname, mode, **kwargs):
        """
        The patched version of 'open'; this returns a L{FakeFile} that the
        instantiated L{ConsoleUI} can use.
        """
        self.assertEqual(fname, "/dev/tty")
        self.assertEqual(mode, "r+b")
        self.assertEqual(kwargs['buffering'], 0)
        return self.fakeFile

        The patched version of 'open'; this returns a L{FakeFile} that the
        instantiated L{ConsoleUI} can use.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_knownhosts.py