def test_get_time_scope_units_empty_default(self): """Test get_time_scope_units returns default when query params are empty.""" query_params = {} handler = ReportQueryHandler(query_params, '', self.tenant, 'unblended_cost', 'currency_code') self.assertEqual(handler.get_time_scope_units(), 'day') self.assertEqual(handler.get_time_scope_units(), 'day')
def test_get_time_scope_units_empty_day_time_scope(self): """Test get_time_scope_units returns default when time_scope is month.""" query_params = {'filter': {'time_scope_value': -10}} handler = ReportQueryHandler(query_params, '', self.tenant, 'unblended_cost', 'currency_code') self.assertEqual(handler.get_time_scope_units(), 'day')