MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_m2o_compare_instance_negated

Method test_m2o_compare_instance_negated

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

Source from the content-addressed store, hash-verified

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
1760 u7 = User(id=5)
1761 attributes.instance_state(u7)._commit_all(attributes.instance_dict(u7))
1762 u7.id = 7
1763
1764 self._test(
1765 Address.user != u7,
1766 "addresses.user_id != :user_id_1 OR addresses.user_id IS NULL",
1767 checkparams={"user_id_1": 7},
1768 )
1769
1770 def test_m2o_compare_instance_negated_warn_on_none(self):
1771 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