'Calling L{util.initgroups} will call the underlying stdlib
implmentation.'

def test_initgroupsInStdlib(self):

    calls = []
    util._initgroups = (lambda x, y: calls.append((x, y)))
    setgroupsCalls = []
    util.setgroups = setgroupsCalls.append
    util.initgroups(os.getuid(), 4)
    self.assertEqual(calls, [(pwd.getpwuid(os.getuid())[0], 4)])
    self.assertFalse(setgroupsCalls)
