MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _fixture

Method _fixture

test/orm/test_sync.py:61–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 cls.mapper_registry.map_imperatively(cls.classes.B, cls.tables.t2)
60
61 def _fixture(self):
62 A, B = self.classes.A, self.classes.B
63 session = fixture_session()
64 uowcommit = self._get_test_uow(session)
65 a_mapper = class_mapper(A)
66 b_mapper = class_mapper(B)
67 self.a1 = a1 = A()
68 self.b1 = b1 = B()
69 uowcommit = self._get_test_uow(session)
70 return (
71 uowcommit,
72 attributes.instance_state(a1),
73 attributes.instance_state(b1),
74 a_mapper,
75 b_mapper,
76 )
77
78 def test_populate(self):
79 uowcommit, a1, b1, a_mapper, b_mapper = self._fixture()

Callers 15

test_populateMethod · 0.95
test_clearMethod · 0.95
test_clear_pkMethod · 0.95
test_clear_unmappedMethod · 0.95
test_updateMethod · 0.95
test_update_unmappedMethod · 0.95
test_populate_dictMethod · 0.95

Calls 5

fixture_sessionFunction · 0.90
class_mapperFunction · 0.90
AClass · 0.70
BClass · 0.70
_get_test_uowMethod · 0.45

Tested by

no test coverage detected