File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,14 @@ async def test_ensure_connection(client: Pyneo4jClient):
7474 client = Pyneo4jClient ()
7575 await client .cypher ("MATCH (n) RETURN n" )
7676
77- with pytest .raises (NotConnectedToDatabase ):
78- await client .close ()
79- await client .cypher ("MATCH (n) RETURN n" )
80-
8177 await client .connect ("bolt://localhost:7687" , auth = ("neo4j" , "password" ))
8278 results , _ = await client .cypher ("MATCH (n) RETURN n" )
8379 assert results == []
8480
81+ with pytest .raises (NotConnectedToDatabase ):
82+ await client .close ()
83+ await client .cypher ("MATCH (n) RETURN n" )
84+
8585
8686async def test_register_models (client : Pyneo4jClient , session : AsyncSession ):
8787 class ClientNodeModel (NodeModel ):
@@ -109,11 +109,13 @@ class Settings:
109109
110110 query_results = await session .run ("SHOW CONSTRAINTS" )
111111 constraint_results = [result .values () async for result in query_results ]
112+ await query_results .consume ()
112113
113114 assert len (constraint_results ) == 3
114115
115116 query_results = await session .run ("SHOW INDEXES" )
116117 index_results = [result .values () async for result in query_results ]
118+ await query_results .consume ()
117119
118120 assert len (index_results ) == 12
119121
You can’t perform that action at this time.
0 commit comments