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
This commit is contained in:
Takashi NATSUME 2017-05-18 18:17:03 +09:00
parent 22f2bbcbd8
commit 05ca7db4d7

View File

@ -25,17 +25,15 @@ class TestAggregateNotificationSample(
aggregate = self.admin_api.post_aggregate(aggregate_req) aggregate = self.admin_api.post_aggregate(aggregate_req)
self.assertEqual(2, len(fake_notifier.VERSIONED_NOTIFICATIONS)) 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( self._verify_notification(
'aggregate-create-start', 'aggregate-create-start',
replacements={ replacements={
'uuid': self.ANY}, 'uuid': aggregate['uuid']},
actual=fake_notifier.VERSIONED_NOTIFICATIONS[0]) actual=fake_notifier.VERSIONED_NOTIFICATIONS[0])
self._verify_notification( self._verify_notification(
'aggregate-create-end', 'aggregate-create-end',
replacements={ replacements={
'uuid': self.ANY, 'uuid': aggregate['uuid'],
'id': aggregate['id']}, 'id': aggregate['id']},
actual=fake_notifier.VERSIONED_NOTIFICATIONS[1]) actual=fake_notifier.VERSIONED_NOTIFICATIONS[1])
@ -45,12 +43,12 @@ class TestAggregateNotificationSample(
self._verify_notification( self._verify_notification(
'aggregate-delete-start', 'aggregate-delete-start',
replacements={ replacements={
'uuid': self.ANY, 'uuid': aggregate['uuid'],
'id': aggregate['id']}, 'id': aggregate['id']},
actual=fake_notifier.VERSIONED_NOTIFICATIONS[2]) actual=fake_notifier.VERSIONED_NOTIFICATIONS[2])
self._verify_notification( self._verify_notification(
'aggregate-delete-end', 'aggregate-delete-end',
replacements={ replacements={
'uuid': self.ANY, 'uuid': aggregate['uuid'],
'id': aggregate['id']}, 'id': aggregate['id']},
actual=fake_notifier.VERSIONED_NOTIFICATIONS[3]) actual=fake_notifier.VERSIONED_NOTIFICATIONS[3])