Skip to content

Commit

Permalink
Fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tonioo committed Oct 8, 2024
1 parent 272393f commit 57c18a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/async_/test_match_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ async def test_contains():

@mark_async_test
async def test_order_by():
for c in await Coffee.nodes:
await c.delete()
# Clean DB before we start anything...
await adb.cypher_query("MATCH (n) DETACH DELETE n")

c1 = await Coffee(name="Icelands finest", price=5).save()
c2 = await Coffee(name="Britains finest", price=10).save()
Expand Down Expand Up @@ -316,7 +316,7 @@ async def test_order_by():
ValueError,
match=r".*Neo4j internals like id or element_id are not allowed for use in this operation.",
):
await Coffee.nodes.order_by("id")
await Coffee.nodes.order_by("id").all()

# Test order by on a relationship
l = await Supplier(name="lidl2").save()
Expand Down
6 changes: 3 additions & 3 deletions test/sync_/test_match_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ def test_contains():

@mark_sync_test
def test_order_by():
for c in Coffee.nodes:
c.delete()
# Clean DB before we start anything...
db.cypher_query("MATCH (n) DETACH DELETE n")

c1 = Coffee(name="Icelands finest", price=5).save()
c2 = Coffee(name="Britains finest", price=10).save()
Expand Down Expand Up @@ -312,7 +312,7 @@ def test_order_by():
ValueError,
match=r".*Neo4j internals like id or element_id are not allowed for use in this operation.",
):
Coffee.nodes.order_by("id")
Coffee.nodes.order_by("id").all()

# Test order by on a relationship
l = Supplier(name="lidl2").save()
Expand Down

0 comments on commit 57c18a5

Please sign in to comment.