Merge "Correct usage of transport_url in example"

This commit is contained in:
Zuul 2018-06-06 20:07:32 +00:00 committed by Gerrit Code Review
commit 9180695784
2 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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):