MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _test_update

Method _test_update

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

Source from the content-addressed store, hash-verified

600 return asserter
601
602 def _test_update(self, person_cls):
603 Person = person_cls
604
605 s = fixture_session()
606 s.add(Person(id=5, personname="thename"))
607 s.commit()
608
609 with self.sql_execution_asserter(testing.db) as asserter:
610 s.bulk_update_mappings(
611 Person, [{"id": 5, "personname": "newname"}]
612 )
613
614 eq_(s.query(Person).first(), Person(id=5, personname="newname"))
615
616 return asserter
617
618 def _test_update_states(self, person_cls):
619 Person = person_cls

Callers 3

test_update_keysMethod · 0.95
test_update_attrsMethod · 0.95
test_update_bothMethod · 0.95

Calls 9

fixture_sessionFunction · 0.90
eq_Function · 0.90
PersonClass · 0.70
addMethod · 0.45
commitMethod · 0.45
bulk_update_mappingsMethod · 0.45
firstMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected