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

Method _fixture

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

Source from the content-addressed store, hash-verified

2878 cls.mapper_registry.map_imperatively(User, users)
2879
2880 def _fixture(self):
2881 User = self.classes.User
2882
2883 canary = []
2884
2885 def load(target, ctx):
2886 canary.append("load")
2887
2888 def refresh(target, ctx, attrs):
2889 canary.append(("refresh", attrs))
2890
2891 event.listen(User, "load", load)
2892 event.listen(User, "refresh", refresh)
2893 return canary
2894
2895 def test_already_present(self):
2896 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