Changes driver method for notifications

Oslo.messaging.Transport is used as an abstraction to redirect function
calls to the configured driver. _send_notification called
self._driver.send instead of self._driver.send_notification

As the test
oslo.messaging.tests.TestTransportMethodArgs.test_send_notification also
assumed that send was the correct method, this should be changed
accordingly

Change-Id: I9406d74f3dc13c44d1aaad5379aafbf1a8580137
This commit is contained in:
Christian Strack 2013-10-31 12:50:45 +01:00
parent 7914181398
commit b29a1462c2
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ class Transport(object):
if not target.topic:
raise exceptions.InvalidTarget('A topic is required to send',
target)
self._driver.send(target, ctxt, message, version)
self._driver.send_notification(target, ctxt, message, version)
def _listen(self, target):
if not (target.topic and target.server):

View File

@ -275,8 +275,8 @@ class TestTransportMethodArgs(test_utils.BaseTestCase):
def test_send_notification(self):
t = transport.Transport(_FakeDriver(cfg.CONF))
self.mox.StubOutWithMock(t._driver, 'send')
t._driver.send(self._target, 'ctxt', 'message', 1.0)
self.mox.StubOutWithMock(t._driver, 'send_notification')
t._driver.send_notification(self._target, 'ctxt', 'message', 1.0)
self.mox.ReplayAll()
t._send_notification(self._target, 'ctxt', 'message', version=1.0)