def test_shadowGetByName(self):
        userdb = ShadowDatabase()
        userdb.addUser('bob', 'passphrase', 1, 2, 3, 4, 5, 6, 7)
        self.patch(checkers, 'spwd', userdb)

        self.mockos.euid = 2345
        self.mockos.egid = 1234
        self.patch(checkers, 'os', self.mockos)
        self.patch(util, 'os', self.mockos)

        self.assertEquals(
            checkers._shadowGetByName('bob'), userdb.getspnam('bob'))
        self.assertEquals(self.mockos.seteuidCalls, [0, 2345])
        self.assertEquals(self.mockos.setegidCalls, [0, 1234])
L{_shadowGetByName} returns a tuple of items from the UNIX /etc/shadow
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/conch/test/test_checkers.py/HelperTests.test_shadowGetByName