MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_prefix_with

Method test_prefix_with

test/sql/test_insert.py:361–381  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

359 )
360
361 def test_prefix_with(self):
362 table1 = self.tables.mytable
363
364 stmt = (
365 table1.insert()
366 .prefix_with("A", "B", dialect="mysql")
367 .prefix_with("C", "D")
368 )
369
370 self.assert_compile(
371 stmt,
372 "INSERT C D INTO mytable (myid, name, description) "
373 "VALUES (:myid, :name, :description)",
374 )
375
376 self.assert_compile(
377 stmt,
378 "INSERT A B C D INTO mytable (myid, name, description) "
379 "VALUES (%s, %s, %s)",
380 dialect=mysql.dialect(),
381 )
382
383 def test_inline_default(self):
384 metadata = MetaData()

Callers

nothing calls this directly

Calls 4

prefix_withMethod · 0.80
assert_compileMethod · 0.80
insertMethod · 0.45
dialectMethod · 0.45

Tested by

no test coverage detected