示例#1
0
def test_create_union():
    ast = create(node()).union_all(create(node()))
    assert_that(
        str(ast),
        is_(equal_to("CREATE () UNION ALL CREATE ()")),
    )
    assert_that(
        dict(ast),
        is_(equal_to(dict())),
    )
示例#2
0
def test_create_set():
    ast = create(node()).set(*parameters(foo="bar"))
    assert_that(
        str(ast),
        is_(equal_to("CREATE () SET foo = $foo")),
    )
    assert_that(
        dict(ast),
        is_(equal_to(dict(foo="bar"))),
    )
示例#3
0
def test_create_ret():
    ast = create(node()).ret("foo")
    assert_that(
        str(ast),
        is_(equal_to("CREATE () RETURN foo")),
    )
    assert_that(
        dict(ast),
        is_(equal_to(dict())),
    )
示例#4
0
def test_create_merge():
    ast = create(node()).merge(node())
    assert_that(
        str(ast),
        is_(equal_to("CREATE () MERGE ()")),
    )
    assert_that(
        dict(ast),
        is_(equal_to(dict())),
    )
示例#5
0
def test_create_match():
    ast = create(node()).match(node())
    assert_that(
        str(ast),
        is_(equal_to("MATCH () CREATE ()")),
    )
    assert_that(
        dict(ast),
        is_(equal_to(dict())),
    )
示例#6
0
def test_create_delete():
    ast = create(node()).delete("foo")
    assert_that(
        str(ast),
        is_(equal_to("CREATE () DELETE foo")),
    )
    assert_that(
        dict(ast),
        is_(equal_to(dict())),
    )