Exemplo n.º 1
0
 def test_get_group_by_with_service_list(self):
     """Test the get_group_by_data method with no data in the query params."""
     expected = ['a', 'b']
     query_string = '?group_by[service]=a&group_by[service]=b'
     handler = ReportQueryHandler({'group_by': {
         'service': expected
     }}, query_string, self.tenant, 'unblended_cost', 'currency_code')
     service = handler.get_group_by_data('service')
     self.assertEqual(expected, service)
Exemplo n.º 2
0
 def test_get_group_by_no_data(self):
     """Test the get_group_by_data method with no data in the query params."""
     handler = ReportQueryHandler({}, '', self.tenant, 'unblended_cost',
                                  'currency_code')
     self.assertFalse(handler.get_group_by_data('service'))