def test_passwd(self):
        """
        The C{--passwd} command-line option will load a passwd-like file.
        """
        self.options.parseOptions(['--telnetPort', 'tcp:22',
                                   '--passwd', self.filename])
        service = manhole_tap.makeService(self.options)
        portal = service.services[0].factory.protocol.portal

        self.assertEqual(len(portal.checkers.keys()), 2)

        # Ensure it's the passwd file we wanted by trying to authenticate
        self.assertTrue(self.successResultOf(
            portal.login(UsernamePassword(*self.usernamePassword),
                         None, telnet.ITelnetProtocol)))
        self.assertIsInstance(self.failureResultOf(
            portal.login(UsernamePassword(b"wrong", b"user"),
                         None, telnet.ITelnetProtocol)).value,
                         error.UnauthorizedLogin)

        The C{--passwd} command-line option will load a passwd-like file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_manhole_tap.py