def test_shadowGetByNameWithoutSpwd(self):
        """
        L{_shadowGetByName} returns L{None} if C{spwd} is not present.
        """
        self.patch(checkers, 'spwd', None)

        self.assertIsNone(checkers._shadowGetByName('bob'))
        self.assertEqual(self.mockos.seteuidCalls, [])
        self.assertEqual(self.mockos.setegidCalls, [])

        L{_shadowGetByName} returns L{None} if C{spwd} is not present.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_checkers.py