Test that CRITICAL log entry does not go to the audit log.
(self)
| 114 | self.assertNotIn(msg, audit_log_entries) |
| 115 | |
| 116 | def test_log_critical(self): |
| 117 | """Test that CRITICAL log entry does not go to the audit log.""" |
| 118 | logging.setup(self.cfg_path) |
| 119 | log = logging.getLogger(__name__) |
| 120 | msg = uuid.uuid4().hex |
| 121 | log.critical(msg) |
| 122 | info_log_entries = open(self.info_log_path).read() |
| 123 | self.assertIn(msg, info_log_entries) |
| 124 | audit_log_entries = open(self.audit_log_path).read() |
| 125 | self.assertNotIn(msg, audit_log_entries) |
| 126 | |
| 127 | def test_log_audit(self): |
| 128 | """Test that AUDIT log entry goes to the audit log.""" |