MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_log_large_multi_parameter

Method test_log_large_multi_parameter

test/engine/test_logging.py:353–366  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

351 )
352
353 def test_log_large_multi_parameter(self):
354 import random
355
356 lp1 = "".join(chr(random.randint(52, 85)) for i in range(5))
357 lp2 = "".join(chr(random.randint(52, 85)) for i in range(8))
358 lp3 = "".join(chr(random.randint(52, 85)) for i in range(670))
359
360 exec_sql(self.eng, "SELECT ?, ?, ?", (lp1, lp2, lp3))
361
362 eq_(
363 self.buf.buffer[2].message,
364 "[raw sql] ('%s', '%s', '%s ... (372 characters truncated) "
365 "... %s')" % (lp1, lp2, lp3[0:149], lp3[-149:]),
366 )
367
368 def test_log_large_parameter_multiple(self):
369 import random

Callers

nothing calls this directly

Calls 3

eq_Function · 0.90
exec_sqlFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected