def test_valid_event(self, aggregator): check = AgentCheck() event = { "event_type": "new.event", "msg_title": "new test event", "aggregation_key": "test.event", "msg_text": "test event test event", "tags": None, } check.event(event) aggregator.assert_event('test event test event')
def test_valid_event(self, aggregator): check = AgentCheck() event = { "event_type": "new.event", "msg_title": "new test event", "aggregation_key": "test.event", "msg_text": "test event test event", "tags": ["foo", "bar"], "timestamp": 1, } check.event(event) aggregator.assert_event('test event test event', tags=["foo", "bar"])
def test_encoding(self, aggregator, msg_text): check = AgentCheck() event = { 'event_type': 'new.event', 'msg_title': 'new test event', 'aggregation_key': 'test.event', 'msg_text': msg_text, 'tags': ['∆', u'Ω-bar'], 'timestamp': 1, } check.event(event) aggregator.assert_event(to_string(msg_text), tags=['∆', 'Ω-bar'])
def test_namespace(self, aggregator): check = AgentCheck() check.__NAMESPACE__ = 'test' event = { 'event_type': 'new.event', 'msg_title': 'new test event', 'aggregation_key': 'test.event', 'msg_text': 'test event test event', 'tags': None, } check.event(event) aggregator.assert_event('test event test event', source_type_name='test')