'L{ident.ProcServerMixin.lookup} uses the Linux TCP process table.'

def testLookupProcNetTcp(self):

    open_calls = []
    def mocked_open(*args, **kwargs):
        '\n                                                Mock    for    the    open    call    to    prevent    actually    opening    /proc/net/tcp.\n                                                '
        open_calls.append((args, kwargs))
        return NativeStringIO(self.sampleFile)
    self.patch(builtins, 'open', mocked_open)
    p = ident.ProcServerMixin()
    self.assertRaises(ident.NoUser, p.lookup, ('127.0.0.1', 26), ('1.2.3.4', 762))
    self.assertEqual([(('/proc/net/tcp',), {})], open_calls)
