MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_unchanged_persistent

Method test_unchanged_persistent

test/orm/test_dynamic.py:2071–2086  ·  view source on GitHub ↗
(self, persistent_fixture)

Source from the content-addressed store, hash-verified

2069 self._assert_history(o1, ([], [], [i1]))
2070
2071 def test_unchanged_persistent(self, persistent_fixture):
2072 Address = self.classes.Address
2073
2074 u1, a1, s = persistent_fixture()
2075 a2, a3 = Address(email_address="a2"), Address(email_address="a3")
2076
2077 u1.addresses.add(a1)
2078 u1.addresses.add(a2)
2079 s.flush()
2080
2081 u1.addresses.add(a3)
2082 u1.addresses.remove(a2)
2083
2084 self._assert_history(
2085 u1, ([a3], [a1], [a2]), compare_passive=([a3], [], [a2])
2086 )
2087
2088 def test_replace_transient(self, transient_fixture):
2089 Address = self.classes.Address

Callers

nothing calls this directly

Calls 5

_assert_historyMethod · 0.95
AddressClass · 0.70
addMethod · 0.45
flushMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected