'Ensure user home dir check detect folders modifiable by non-owners.'

def testUserHomeDirCheck(self):

    data = [self.CreateStat('/root', 0, 0, 16872), self.CreateStat('/home/non-matching-user1', 1000, 600, 16832), self.CreateStat('/home/user2', 200, 60, 16888), self.CreateStat('/home/user3', 300, 70, 16895), self.CreateStat('/home/user4', 400, 70, 16880), self.CreateStat('/home/non-matching-user2', 500, 80, 16877), self.CreateStat('/home/non-matching-user3', 2000, 800, 16872), self.CreateStat('/home/non-matching-user4', 6000, 600, 16873), self.CreateStat('/home/user8', 700, 70, 16874)]
    results = self.GenResults(['UserHomeDirs'], [data])
    check_id = 'CIS-HOME-DIRS-WRITABLE-BY-NON-OWNERS'
    sym = 'Found:    User    home    directory    can    be    written    to    by    group    or    others.'
    found = ['/home/user2    user:    200,    group:    60,    mode:    drwxrwx---', '/home/user3    user:    300,    group:    70,    mode:    drwxrwxrwx', '/home/user4    user:    400,    group:    70,    mode:    drwxrw----', '/home/user8    user:    700,    group:    70,    mode:    drwxr-x-w-']
    self.assertCheckDetectedAnom(check_id, results, sym, found)
