(self)
| 1425 | eq_(m1.mock_calls, [call("x")]) |
| 1426 | |
| 1427 | def test_clslevel_subclass(self): |
| 1428 | Target = self._fixture() |
| 1429 | |
| 1430 | class SubTarget(Target): |
| 1431 | pass |
| 1432 | |
| 1433 | m1 = Mock() |
| 1434 | |
| 1435 | event.listen(Target, "event_two", m1) |
| 1436 | |
| 1437 | t1 = SubTarget() |
| 1438 | t1.dispatch.event_two("x") |
| 1439 | |
| 1440 | event.remove(Target, "event_two", m1) |
| 1441 | |
| 1442 | t1.dispatch.event_two("y") |
| 1443 | |
| 1444 | eq_(m1.mock_calls, [call("x")]) |
| 1445 | |
| 1446 | def test_instance(self): |
| 1447 | Target = self._fixture() |