def test_generate_rules_no_domain(self): global_config = scanner_test_utils.create_test_global_config() global_config.pop('domain') got_rules = isr.IamScannerRules().generate_rules(_PROJECTS, global_config) want_rules = yaml.load(_EXPECTED_RULES_YAML) want_rules['rules'] = want_rules['rules'][4:] # trim global rules self.assertEqual(got_rules, want_rules)
def test_generate_rules(self): got_rules = isr.IamScannerRules().generate_rules( _PROJECTS, scanner_test_utils.create_test_global_config()) want_rules = yaml.load(_EXPECTED_RULES_YAML) self.assertDictEqual(got_rules, want_rules)