Exemplo n.º 1
0
def test_cannot_begin_transaction_if_not_available():
    uri = "http://localhost:7474/db/data/cypher"
    cypher = CypherResource(uri)
    try:
        _ = cypher.begin()
    except NotImplementedError:
        assert True
    else:
        assert False
Exemplo n.º 2
0
def test_can_begin_transaction():
    uri = "http://localhost:7474/db/data/cypher"
    transaction_uri = "http://localhost:7474/db/data/transaction"
    cypher = CypherResource(uri, transaction_uri)
    tx = cypher.begin()
    assert isinstance(tx, CypherTransaction)