Esempio n. 1
0
def test_path():
    expected = '{"Path": ["bar", false]}'
    assert json.dumps(db_attrs.Path('bar'), cls=QueryEncoder) == expected
Esempio n. 2
0
def test_path_inverted():
    expected = '{"Path": ["bar", true]}'
    assert json.dumps(~db_attrs.Path('bar'), cls=QueryEncoder) == expected
Esempio n. 3
0
def test_decode_path():
    dump = '{"Path": ["bar", false]}'
    assert json.loads(dump, object_hook=query_decode) == db_attrs.Path('bar')