MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_all_mappers_accessor_one

Method test_all_mappers_accessor_one

test/orm/test_events.py:831–861  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

829 )
830
831 def test_all_mappers_accessor_one(self):
832 User, Address = self.classes("User", "Address")
833
834 sess = Session(testing.db, future=True)
835
836 canary = self._flag_fixture(sess)
837
838 sess.execute(
839 select(User.id, Address.email_address, User.name)
840 .join(Address)
841 .filter_by(name="somename")
842 )
843
844 eq_(
845 canary.mock_calls,
846 [
847 call.options(
848 bind_mapper=inspect(User),
849 all_mappers=[inspect(User), inspect(Address)],
850 is_select=True,
851 is_from_statement=False,
852 is_insert=False,
853 is_update=False,
854 is_delete=False,
855 is_orm_statement=True,
856 is_relationship_load=False,
857 is_column_load=False,
858 lazy_loaded_from=None,
859 )
860 ],
861 )
862
863 def test_all_mappers_accessor_two(self):
864 sess = Session(testing.db, future=True)

Callers

nothing calls this directly

Calls 9

_flag_fixtureMethod · 0.95
executeMethod · 0.95
SessionClass · 0.90
selectFunction · 0.90
eq_Function · 0.90
inspectFunction · 0.90
filter_byMethod · 0.45
joinMethod · 0.45
optionsMethod · 0.45

Tested by

no test coverage detected