MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_identity_key

Method test_identity_key

test/orm/test_inspect.py:594–601  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

592 assert not insp.is_instance
593
594 def test_identity_key(self):
595 User = self.classes.User
596 u1 = User(name="ed")
597 s = Session(testing.db)
598 s.add(u1)
599 s.flush()
600 insp = inspect(u1)
601 eq_(insp.identity_key, identity_key(User, (u1.id,)))
602
603 def test_persistence_states(self):
604 User = self.classes.User

Callers

nothing calls this directly

Calls 7

addMethod · 0.95
flushMethod · 0.95
SessionClass · 0.90
inspectFunction · 0.90
eq_Function · 0.90
identity_keyFunction · 0.90
UserClass · 0.70

Tested by

no test coverage detected