MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_non_orm_statements

Method test_non_orm_statements

test/orm/test_events.py:803–829  ·  view source on GitHub ↗
(self, stmt, is_select)

Source from the content-addressed store, hash-verified

801 (lambda: text("select * from users"), False),
802 )
803 def test_non_orm_statements(self, stmt, is_select):
804 sess = Session(testing.db, future=True)
805
806 canary = self._flag_fixture(sess)
807
808 user_table = self.tables.users
809 stmt = testing.resolve_lambda(stmt, user_table=user_table)
810 sess.execute(stmt).all()
811
812 eq_(
813 canary.mock_calls,
814 [
815 call.options(
816 bind_mapper=None,
817 all_mappers=[],
818 is_select=is_select,
819 is_from_statement=False,
820 is_insert=False,
821 is_update=False,
822 is_delete=False,
823 is_orm_statement=False,
824 is_relationship_load=False,
825 is_column_load=False,
826 lazy_loaded_from=None,
827 )
828 ],
829 )
830
831 def test_all_mappers_accessor_one(self):
832 User, Address = self.classes("User", "Address")

Callers

nothing calls this directly

Calls 6

_flag_fixtureMethod · 0.95
executeMethod · 0.95
SessionClass · 0.90
eq_Function · 0.90
allMethod · 0.45
optionsMethod · 0.45

Tested by

no test coverage detected