MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_modified_event

Method test_modified_event

test/ext/test_mutable.py:316–333  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

314 eq_(f1.data, {"a": "c"})
315
316 def test_modified_event(self):
317 canary = mock.Mock()
318 event.listen(Foo.data, "modified", canary)
319
320 f1 = Foo(data={"a": "b"})
321 f1.data["a"] = "c"
322
323 eq_(
324 canary.mock_calls,
325 [
326 mock.call(
327 f1,
328 attributes.AttributeEventToken(
329 Foo.data.impl, attributes.OP_MODIFIED
330 ),
331 )
332 ],
333 )
334
335 def test_clear(self):
336 sess = fixture_session()

Callers

nothing calls this directly

Calls 3

eq_Function · 0.90
FooClass · 0.70
listenMethod · 0.45

Tested by

no test coverage detected