MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / test03_long_query

Method test03_long_query

tests/flow/test_graph_info.py:200–215  ·  view source on GitHub ↗

long queries are truncated with: ...

(self)

Source from the content-addressed store, hash-verified

198 self.env.assertLess(len(logged_queries), 1200)
199
200 def test03_long_query(self):
201 """long queries are truncated with: ..."""
202
203 # create a long string
204 length = 4000
205 long_str = ''.join(random.choice(string.ascii_lowercase) for _ in range(length))
206
207 q = f"RETURN '{long_str}'"
208 self.graph.query(q)
209
210 # read stream
211 logged_queries = self.consumeStream(StreamName(self.graph), drop=False)
212
213 logged_query = logged_queries[0]
214
215 self.env.assertEquals(logged_query.Query, q)
216
217 def test04_delete_graph(self):
218 """make sure reporting stream is deleted when graph is deleted"""

Callers

nothing calls this directly

Calls 3

consumeStreamMethod · 0.95
StreamNameFunction · 0.85
queryMethod · 0.45

Tested by

no test coverage detected