Fix using anyjson in fake_notifier
For some reason we were using anyjson.serialize() in our fake_notifier. That may have been to mirror kombu, but really we need to mirror what we do when we convert our payloads to primitives, which is using jsonutils. Closes-Bug: #1403162 Change-Id: I92a4708e0700e88f4b2554aa4e7ad3856f5be1e0
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
import collections
|
||||
import functools
|
||||
|
||||
import anyjson
|
||||
from oslo import messaging
|
||||
from oslo.serialization import jsonutils
|
||||
|
||||
from nova import rpc
|
||||
|
||||
@@ -54,7 +54,7 @@ class FakeNotifier(object):
|
||||
# NOTE(sileht): simulate the kombu serializer
|
||||
# this permit to raise an exception if something have not
|
||||
# been serialized correctly
|
||||
anyjson.serialize(payload)
|
||||
jsonutils.to_primitive(payload)
|
||||
msg = FakeMessage(self.publisher_id, priority, event_type, payload)
|
||||
NOTIFICATIONS.append(msg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user