MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_update

Method test_update

test/orm/test_unitofwork.py:1267–1280  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1265 self.sql_count_(0, go)
1266
1267 def test_update(self):
1268 default_t, Hoho = self.tables.default_t, self.classes.Hoho
1269
1270 self.mapper_registry.map_imperatively(Hoho, default_t)
1271
1272 h1 = Hoho()
1273 session = fixture_session()
1274 session.add(h1)
1275 session.flush()
1276
1277 eq_(h1.foober, "im foober")
1278 h1.counter = 19
1279 session.flush()
1280 eq_(h1.foober, "im the update")
1281
1282 def test_used_in_relationship(self):
1283 """A server-side default can be used as the target of a foreign key"""

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
eq_Function · 0.90
map_imperativelyMethod · 0.80
HohoClass · 0.70
addMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected