def test_notification_after_serialization(self, notifier): orig_notify = notification.TroveCommonTraits(instance=self.instance) serialized = orig_notify.serialize(None) new_notify = notification.TroveCommonTraits().deserialize(None, serialized) new_notify.notify('event_type', 'publisher') self.assertTrue(notifier().info.called)
def test_notification(self, notifier): notification.TroveCommonTraits( instance=self.instance).notify('event_type', 'publisher') self.assertTrue(notifier().info.called) a, _ = notifier().info.call_args payload = a[2] self.assertTrue('availability_zone' in payload)