Esempio n. 1
0
 def test_has_filter_with_filter(self):
     """Test the has_filter method with filter in the query params."""
     query_params = {
         'filter': {
             'resolution': 'monthly',
             'time_scope_value': -1
         }
     }
     handler = ReportQueryHandler(query_params, '', self.tenant,
                                  'unblended_cost', 'currency_code')
     self.assertIsNotNone(
         handler.check_query_params('filter', 'time_scope_value'))
Esempio n. 2
0
 def test_has_filter_no_filter(self):
     """Test the has_filter method with no filter in the query params."""
     handler = ReportQueryHandler({}, '', self.tenant, 'unblended_cost',
                                  'currency_code')
     self.assertFalse(
         handler.check_query_params('filter', 'time_scope_value'))