diff --git a/oslo/messaging/notify/_impl_test.py b/oslo/messaging/notify/_impl_test.py index 79e883e8e..10d69e607 100644 --- a/oslo/messaging/notify/_impl_test.py +++ b/oslo/messaging/notify/_impl_test.py @@ -17,14 +17,18 @@ from oslo.messaging.notify import notifier +NOTIFICATIONS = [] + + +def reset(): + "Clear out the list of recorded notifications." + global NOTIFICATIONS + NOTIFICATIONS = [] + class TestDriver(notifier._Driver): "Store notifications in memory for test verification." - def __init__(self, conf, **kwargs): - super(TestDriver, self).__init__(conf, **kwargs) - self.notifications = [] - def notify(self, ctxt, message, priority): - self.notifications.append(message) + NOTIFICATIONS.append((ctxt, message, priority))