def _build_boolean_expression_filter(spec, context): wrapped = BooleanExpressionFilterSpec.wrap(spec) return SinglePropertyValueFilter( expression=ExpressionFactory.from_spec(wrapped.expression, context), operator=get_operator(wrapped.operator), reference_value=wrapped.property_value, )
def _build_boolean_expression_filter(spec, context): wrapped = BooleanExpressionFilterSpec.wrap(spec) return SinglePropertyValueFilter( expression=ExpressionFactory.from_spec(wrapped.expression, context), operator=get_operator(wrapped.operator), reference_expression=ExpressionFactory.from_spec(wrapped.property_value, context), )
def _build_boolean_expression_filter(spec, context): from corehq.apps.userreports.expressions.factory import ExpressionFactory wrapped = BooleanExpressionFilterSpec.wrap(spec) return SinglePropertyValueFilter( expression=ExpressionFactory.from_spec(wrapped.expression), operator=get_operator(wrapped.operator), reference_value=wrapped.property_value, )
def test_in_operator(self, input, reference_list, expected_result): self.assertEqual(expected_result, get_operator('in')(input, reference_list))