MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_m2o_compare_instance

Method test_m2o_compare_instance

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

Source from the content-addressed store, hash-verified

1748 )
1749
1750 def test_m2o_compare_instance(self):
1751 User, Address = self.classes.User, self.classes.Address
1752 u7 = User(id=5)
1753 attributes.instance_state(u7)._commit_all(attributes.instance_dict(u7))
1754 u7.id = 7
1755
1756 self._test(Address.user == u7, ":param_1 = addresses.user_id")
1757
1758 def test_m2o_compare_instance_negated(self):
1759 User, Address = self.classes.User, self.classes.Address

Callers

nothing calls this directly

Calls 3

_testMethod · 0.95
_commit_allMethod · 0.80
UserClass · 0.70

Tested by

no test coverage detected