MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_instrumented_attributes

Method test_instrumented_attributes

test/orm/test_cache_key.py:199–213  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

197 eq_(ck2.bindparams[0].value, 20)
198
199 def test_instrumented_attributes(self):
200 User, Address, Keyword, Order, Item = self.classes(
201 "User", "Address", "Keyword", "Order", "Item"
202 )
203
204 self._run_cache_key_fixture(
205 lambda: (
206 User.addresses,
207 User.addresses.of_type(aliased(Address)),
208 User.orders,
209 User.orders.and_(Order.id != 5),
210 User.orders.and_(Order.description != "somename"),
211 ),
212 compare_values=True,
213 )
214
215 def test_unbound_options(self):
216 User, Address, Keyword, Order, Item = self.classes(

Callers

nothing calls this directly

Calls 4

aliasedFunction · 0.90
of_typeMethod · 0.45
and_Method · 0.45

Tested by

no test coverage detected