MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_rel_accessors

Method test_rel_accessors

test/orm/test_inspect.py:236–246  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

234 is_(prop._parententity, inspect(ua))
235
236 def test_rel_accessors(self):
237 User = self.classes.User
238 Address = self.classes.Address
239 prop = inspect(User.addresses)
240 is_(prop.property.parent, class_mapper(User))
241 is_(prop.property.mapper, class_mapper(Address))
242 is_(prop.parent, class_mapper(User))
243 is_(prop.mapper, class_mapper(Address))
244
245 assert not hasattr(prop, "columns")
246 assert hasattr(prop, "expression")
247
248 def test_extension_types(self):
249 class SomeClass(self.classes.User):

Callers

nothing calls this directly

Calls 3

inspectFunction · 0.90
is_Function · 0.90
class_mapperFunction · 0.90

Tested by

no test coverage detected