MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_indexed_key_token

Method test_indexed_key_token

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

Source from the content-addressed store, hash-verified

729 is_(path[2], amapper)
730
731 def test_indexed_key_token(self):
732 umapper = inspect(self.classes.User)
733 amapper = inspect(self.classes.Address)
734 path = PathRegistry.coerce(
735 (
736 umapper,
737 umapper.attrs.addresses,
738 amapper,
739 PathToken.intern(":*"),
740 )
741 )
742 is_true(path.is_token)
743 eq_(path[1], umapper.attrs.addresses)
744 eq_(path[3], ":*")
745
746 with expect_raises(IndexError):
747 path[amapper]
748
749 def test_slice_token(self):
750 umapper = inspect(self.classes.User)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected