summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-06 20:07:32 +0000
committerGerrit Code Review <review@openstack.org>2018-06-06 20:07:32 +0000
commit9180695784cc4e5e5b76888516146ad2454eff77 (patch)
tree9fea7254f4b0de2ebd1204a0e41d746cb9cd263f
parent71888358907279e11410cec6b82a6b5560dc3736 (diff)
parent93280347ab6820a7eb0d869a80293b73020b8d8f (diff)
downloadoslo-messaging-9180695784cc4e5e5b76888516146ad2454eff77.tar.gz
Merge "Correct usage of transport_url in example"
-rw-r--r--oslo_messaging/conffixture.py2
-rwxr-xr-xoslo_messaging/tests/test_transport.py11
2 files changed, 8 insertions, 5 deletions
diff --git a/oslo_messaging/conffixture.py b/oslo_messaging/conffixture.py
index 94f2f89..2f75e9a 100644
--- a/oslo_messaging/conffixture.py
+++ b/oslo_messaging/conffixture.py
@@ -37,7 +37,7 @@ class ConfFixture(fixtures.Fixture):
An example usage::
self.messaging_conf = self.useFixture(messaging.ConfFixture(cfg.CONF))
- self.messaging_conf.transport_url = 'fake://'
+ self.messaging_conf.transport_url = 'fake:/'
:param conf: a ConfigOpts instance
:type conf: oslo.config.cfg.ConfigOpts
diff --git a/oslo_messaging/tests/test_transport.py b/oslo_messaging/tests/test_transport.py
index c37f352..6e32064 100755
--- a/oslo_messaging/tests/test_transport.py
+++ b/oslo_messaging/tests/test_transport.py
@@ -354,10 +354,13 @@ class TestTransportUrlCustomisation(test_utils.BaseTestCase):
def transport_url_parse(url):
return transport.TransportURL.parse(self.conf, url)
- self.url1 = transport_url_parse("fake://vhost1?x=1&y=2&z=3")
- self.url2 = transport_url_parse("fake://vhost2?foo=bar")
- self.url3 = transport_url_parse("fake://vhost1?l=1&l=2&l=3")
- self.url4 = transport_url_parse("fake://vhost2?d=x:1&d=y:2&d=z:3")
+ self.url1 = transport_url_parse(
+ "fake:/vhost1/localhost:5672/?x=1&y=2&z=3")
+ self.url2 = transport_url_parse("fake:/vhost2/localhost:5672/?foo=bar")
+ self.url3 = transport_url_parse(
+ "fake:/vhost1/localhost:5672/?l=1&l=2&l=3")
+ self.url4 = transport_url_parse(
+ "fake:/vhost2/localhost:5672/?d=x:1&d=y:2&d=z:3")
self.url5 = transport_url_parse("fake://noport:/?")
def test_hash(self):