From 05ca7db4d73dad6dcc28f7b79a0508d3bd5e2c22 Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Thu, 18 May 2017 18:17:03 +0900 Subject: [PATCH] Fix uuid replacement in aggregate notification test Use a UUID in the response body of create aggegate API instead of self.ANY. TrivialFix Change-Id: Id962519e36aff97419579fc03d69ee5b2e7c763e --- .../notification_sample_tests/test_aggregate.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nova/tests/functional/notification_sample_tests/test_aggregate.py b/nova/tests/functional/notification_sample_tests/test_aggregate.py index d5c0ccfae..0d376fb48 100644 --- a/nova/tests/functional/notification_sample_tests/test_aggregate.py +++ b/nova/tests/functional/notification_sample_tests/test_aggregate.py @@ -25,17 +25,15 @@ class TestAggregateNotificationSample( aggregate = self.admin_api.post_aggregate(aggregate_req) self.assertEqual(2, len(fake_notifier.VERSIONED_NOTIFICATIONS)) - # The uuid hasn't been exposed on the REST API yet so we have no way to - # match it here, now. self._verify_notification( 'aggregate-create-start', replacements={ - 'uuid': self.ANY}, + 'uuid': aggregate['uuid']}, actual=fake_notifier.VERSIONED_NOTIFICATIONS[0]) self._verify_notification( 'aggregate-create-end', replacements={ - 'uuid': self.ANY, + 'uuid': aggregate['uuid'], 'id': aggregate['id']}, actual=fake_notifier.VERSIONED_NOTIFICATIONS[1]) @@ -45,12 +43,12 @@ class TestAggregateNotificationSample( self._verify_notification( 'aggregate-delete-start', replacements={ - 'uuid': self.ANY, + 'uuid': aggregate['uuid'], 'id': aggregate['id']}, actual=fake_notifier.VERSIONED_NOTIFICATIONS[2]) self._verify_notification( 'aggregate-delete-end', replacements={ - 'uuid': self.ANY, + 'uuid': aggregate['uuid'], 'id': aggregate['id']}, actual=fake_notifier.VERSIONED_NOTIFICATIONS[3])