(self)
| 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() |