def test_update(self): self.test_save() #shortcut to get one alert alert = CorrelatorAlert.get_by(acknowledged=False) assert not alert.acknowledged alert.acknowledge('user1', 'dummy message') uniqueid = alert.uniqueid connector.commit() del alert alert = CorrelatorAlert.get_by(uniqueid=uniqueid) assert isinstance(alert, CorrelatorAlert) assert alert.uniqueid == uniqueid assert alert.acknowledged
def purge_data(self): for event in AuditEvent.get_all(): event.delete() for alert in CorrelatorAlert.get_all(): alert.delete()