MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _fixture

Method _fixture

test/orm/test_events.py:2616–2629  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2614 cls.mapper_registry.map_imperatively(User, users)
2615
2616 def _fixture(self):
2617 User = self.classes.User
2618
2619 canary = []
2620
2621 def load(target, ctx):
2622 canary.append("load")
2623
2624 def refresh(target, ctx, attrs):
2625 canary.append(("refresh", attrs))
2626
2627 event.listen(User, "load", load)
2628 event.listen(User, "refresh", refresh)
2629 return canary
2630
2631 def test_already_present(self):
2632 User = self.classes.User

Callers 7

test_already_presentMethod · 0.95
test_repeated_rowsMethod · 0.95
test_was_expiredMethod · 0.95

Calls 1

listenMethod · 0.45

Tested by

no test coverage detected