Exemplo n.º 1
0
 def test_url_defaults(self):
     b = RabbitMQ('amqp://', '')
     self.assertEqual('localhost', b.host)
     self.assertEqual(5672, b.port)
     self.assertEqual('/', b.vhost)
     self.assertEqual('guest', b.username)
     self.assertEqual('guest', b.password)
Exemplo n.º 2
0
 def test_url_vhost_slash(self):
     b = RabbitMQ('amqp://*****:*****@host:10000//', '')
     self.assertEqual('host', b.host)
     self.assertEqual(10000, b.port)
     self.assertEqual('/', b.vhost)
     self.assertEqual('user', b.username)
     self.assertEqual('pass', b.password)
Exemplo n.º 3
0
 def test_url(self):
     b = RabbitMQ('amqp://*****:*****@host:10000/vhost', '')
     self.assertEqual('host', b.host)
     self.assertEqual(15672, b.port)
     self.assertEqual('vhost', b.vhost)
     self.assertEqual('user', b.username)
     self.assertEqual('pass', b.password)
Exemplo n.º 4
0
 def test_url_defaults_rabbitmq(self):
     for url in ['amqp://', 'amqp://localhost']:
         b = RabbitMQ(url, '')
         self.assertEqual('localhost', b.host)
         self.assertEqual(15672, b.port)
         self.assertEqual('/', b.vhost)
         self.assertEqual('guest', b.username)
         self.assertEqual('guest', b.password)