MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_column_prefix

Method test_column_prefix

test/orm/test_mapper.py:329–344  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

327 )
328
329 def test_column_prefix(self):
330 users, User = self.tables.users, self.classes.User
331
332 self.mapper(
333 User,
334 users,
335 column_prefix="_",
336 properties={"user_name": synonym("_name")},
337 )
338
339 s = fixture_session()
340 u = s.get(User, 7)
341 eq_(u._name, "jack")
342 eq_(u._id, 7)
343 u2 = s.query(User).filter_by(user_name="jack").one()
344 assert u is u2
345
346 def test_no_pks_1(self):
347 User, users = self.classes.User, self.tables.users

Callers

nothing calls this directly

Calls 8

synonymFunction · 0.90
fixture_sessionFunction · 0.90
eq_Function · 0.90
mapperMethod · 0.45
getMethod · 0.45
oneMethod · 0.45
filter_byMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected