Esempio n. 1
0
 def test_init(self):
     name = 'test'
     exchange = BaseExchange(name)
     self.assertEqual(exchange.name, name)
     self.assertEqual(exchange.policy, DIRECT)
     self.assertEqual(exchange.auto_delete, False)
     # with policy
     policy = 'direct'
     exchange = BaseExchange(name, policy=policy)
     self.assertEqual(exchange.name, name)
     self.assertEqual(exchange.policy, policy)
     self.assertEqual(exchange.auto_delete, False)
Esempio n. 2
0
 def test_abstract(self):
     exchange = BaseExchange('')
     self.assertRaises(NotImplementedError, exchange.bind, '', '')
     self.assertRaises(NotImplementedError, exchange.unbind, '', '')