MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_reconstructor

Method test_reconstructor

test/orm/test_mapper.py:2336–2351  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2334 reg1.configure()
2335
2336 def test_reconstructor(self):
2337 users = self.tables.users
2338
2339 recon = []
2340
2341 class User:
2342 @reconstructor
2343 def reconstruct(self):
2344 recon.append("go")
2345
2346 self.mapper(User, users)
2347
2348 User()
2349 eq_(recon, [])
2350 fixture_session().query(User).first()
2351 eq_(recon, ["go"])
2352
2353 def test_reconstructor_inheritance(self):
2354 users = self.tables.users

Callers

nothing calls this directly

Calls 6

eq_Function · 0.90
fixture_sessionFunction · 0.90
UserClass · 0.70
mapperMethod · 0.45
firstMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected