MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_unchanged_persistent

Method test_unchanged_persistent

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

Source from the content-addressed store, hash-verified

2118 self._assert_history(o1, ([], [], [i1]))
2119
2120 def test_unchanged_persistent(self, persistent_fixture):
2121 Address = self.classes.Address
2122
2123 u1, a1, s = persistent_fixture()
2124 a2, a3 = Address(email_address="a2"), Address(email_address="a3")
2125
2126 u1.addresses.add(a1)
2127 u1.addresses.add(a2)
2128 s.flush()
2129
2130 u1.addresses.add(a3)
2131 u1.addresses.remove(a2)
2132
2133 self._assert_history(
2134 u1, ([a3], [a1], [a2]), compare_passive=([a3], [], [a2])
2135 )
2136
2137 def test_replace_transient(self, transient_fixture):
2138 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