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

Method _fixture

test/orm/test_deprecations.py:1962–1974  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1960 cls._setup_stock_mapping()
1961
1962 def _fixture(self):
1963 User = self.classes.User
1964
1965 s = fixture_session()
1966 u1, u2, u3, u4 = (
1967 User(id=1, name="u1"),
1968 User(id=2, name="u2"),
1969 User(id=7, name="u3"),
1970 User(id=8, name="u4"),
1971 )
1972 s.query(User).filter(User.id.in_([7, 8])).all()
1973 s.close()
1974 return s, [u1, u2, u3, u4]
1975
1976 def test_single_entity(self):
1977 s, (u1, u2, u3, u4) = self._fixture()

Callers 4

test_single_entityMethod · 0.95
test_none_entityMethod · 0.95

Calls 7

fixture_sessionFunction · 0.90
UserClass · 0.70
allMethod · 0.45
filterMethod · 0.45
queryMethod · 0.45
in_Method · 0.45
closeMethod · 0.45

Tested by

no test coverage detected