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

Method test_indexed_key_token

test/orm/test_utils.py:747–763  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

745 is_(path[2], amapper)
746
747 def test_indexed_key_token(self):
748 umapper = inspect(self.classes.User)
749 amapper = inspect(self.classes.Address)
750 path = PathRegistry.coerce(
751 (
752 umapper,
753 umapper.attrs.addresses,
754 amapper,
755 PathToken._intern["relationship:*"],
756 )
757 )
758 is_true(path.is_token)
759 eq_(path[1], umapper.attrs.addresses)
760 eq_(path[3], "relationship:*")
761
762 with expect_raises(IndexError):
763 path[amapper]
764
765 def test_slice_token(self):
766 umapper = inspect(self.classes.User)

Callers

nothing calls this directly

Calls 5

inspectFunction · 0.90
is_trueFunction · 0.90
eq_Function · 0.90
expect_raisesFunction · 0.90
coerceMethod · 0.45

Tested by

no test coverage detected