MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _test_insert

Method _test_insert

test/orm/dml/test_bulk.py:589–600  ·  view source on GitHub ↗
(self, person_cls)

Source from the content-addressed store, hash-verified

587 )
588
589 def _test_insert(self, person_cls):
590 Person = person_cls
591
592 s = fixture_session()
593 with self.sql_execution_asserter(testing.db) as asserter:
594 s.bulk_insert_mappings(
595 Person, [{"id": 5, "personname": "thename"}]
596 )
597
598 eq_(s.query(Person).first(), Person(id=5, personname="thename"))
599
600 return asserter
601
602 def _test_update(self, person_cls):
603 Person = person_cls

Callers 3

test_insert_keysMethod · 0.95
test_insert_attrsMethod · 0.95
test_insert_bothMethod · 0.95

Calls 7

fixture_sessionFunction · 0.90
eq_Function · 0.90
PersonClass · 0.70
bulk_insert_mappingsMethod · 0.45
firstMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected