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

Method test_no_strings

test/orm/test_query.py:6404–6417  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6402 __dialect__ = "default"
6403
6404 def test_no_strings(self):
6405 User = self.classes.User
6406
6407 sess = fixture_session()
6408 q = sess.query(User)
6409
6410 u1 = q.filter_by(name="jack").one()
6411
6412 with expect_raises_message(
6413 sa_exc.ArgumentError,
6414 r"with_parent\(\) accepts class-bound mapped "
6415 "attributes, not strings",
6416 ):
6417 with_parent(u1, "orders")
6418
6419 def test_o2m(self):
6420 User, Order = (

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
expect_raises_messageFunction · 0.90
with_parentFunction · 0.90
queryMethod · 0.45
oneMethod · 0.45
filter_byMethod · 0.45

Tested by

no test coverage detected