Example #1
0
 def test_streams_payload(self):
     streams_payload = [
       {'metric': 'some.metric', 'source': None, 'composite': None},
       {'metric': None, 'source': None, 'composite': 's("other.metric", "sf", {function: "sum"})'}
     ]
     chart = Chart(self.conn, streams=streams_payload)
     self.assertEqual(chart.streams_payload()[0]['metric'], streams_payload[0]['metric'])
Example #2
0
 def test_streams_payload(self):
     streams_payload = [{
         'metric': 'some.metric',
         'source': None,
         'composite': None
     }, {
         'metric':
         None,
         'source':
         None,
         'composite':
         's("other.metric", "sf", {function: "sum"})'
     }]
     chart = Chart(self.conn, streams=streams_payload)
     self.assertEqual(chart.streams_payload()[0]['metric'],
                      streams_payload[0]['metric'])