From b29a1462c2c6706fdf823ff3f30137ad79e389e2 Mon Sep 17 00:00:00 2001
From: Christian Strack <strack@mathematik.uni-marburg.de>
Date: Thu, 31 Oct 2013 12:50:45 +0100
Subject: [PATCH] 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
---
 oslo/messaging/transport.py | 2 +-
 tests/test_transport.py     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/oslo/messaging/transport.py b/oslo/messaging/transport.py
index 2a154c55f..5247be9eb 100644
--- a/oslo/messaging/transport.py
+++ b/oslo/messaging/transport.py
@@ -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):
diff --git a/tests/test_transport.py b/tests/test_transport.py
index 62da912b5..dcf59555c 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -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)