'Ensure cron/at deny check detects if /etc/(at|cron).deny exists.'

def testCronDenyExistCheck(self):

    check_id = 'CIS-AT-CRON-DENY-EXISTS'
    artifact = 'CronAtAllowDenyFiles'
    data1 = [self.CreateStat('/etc/cron.deny', 0, 0, 33184), self.CreateStat('/etc/cronTdeny', 200, 60, 33184), self.CreateStat('/etc/at.deny', 0, 0, 33184), self.CreateStat('/etc/hi/cron.deny', 300, 70, 33184), self.CreateStat('/root/at.deny', 400, 70, 33184)]
    data2 = [self.CreateStat('/etc/at.deny', 0, 0, 33184), self.CreateStat('/etc/cronDdeny', 200, 60, 33184), self.CreateStat('/etc/cron/cron.deny', 300, 70, 33184), self.CreateStat('/home/user1/at.deny', 400, 70, 33184)]
    data3 = [self.CreateStat('/etc/random/at.deny', 0, 0, 33184), self.CreateStat('/etc/cronDdeny', 200, 60, 33184), self.CreateStat('/etc/cron/cron.deny', 300, 70, 33184), self.CreateStat('/home/user1/at.deny', 400, 70, 33184)]
    sym_cron_deny = 'Found:    /etc/cron.deny    exists    on    the    system.'
    sym_at_deny = 'Found:    /etc/at.deny    exists    on    the    system.'
    found_cron_deny = ['/etc/cron.deny    user:    0,    group:    0,    mode:    -rw-r-----']
    found_at_deny = ['/etc/at.deny    user:    0,    group:    0,    mode:    -rw-r-----']
    results = self.GenResults([artifact], [data1])
    self._CheckMultipleSymPerCheck(check_id, results, [sym_cron_deny, sym_at_deny], [found_cron_deny, found_at_deny])
    results = self.GenResults([artifact], [data2])
    self.assertCheckDetectedAnom(check_id, results, sym_at_deny, found_at_deny)
    results = self.GenResults([artifact], [data3])
    self.assertCheckUndetected(check_id, results)
