Exemple #1
0
def test_transform_with_formatters():
    formatters = {'key': bool}
    condition = ('eq', 'key', 'value')
    expected = {'key': True}
    assert convert(condition, formatters=formatters) == expected
Exemple #2
0
def test_transform(_test_cases):
    # logging.debug('')
    for condition, expected_query in _test_cases:
        # logging.debug(' {} ==> {}'.format(condition, expected_query))
        assert convert(condition) == expected_query