def test_publish_synchronous(self): c = Channel(None, None, {}) expect(mock(c, 'tx').select) expect(mock(c, 'basic').publish).args('arg1', 'arg2', foo='bar') expect(c.tx.commit).args(cb='a_cb') c.publish_synchronous('arg1', 'arg2', foo='bar', cb='a_cb')
def test_publish_synchronous(self): c = Channel(None, None, {}) expect(mock(c, "tx").select) expect(mock(c, "basic").publish).args("arg1", "arg2", foo="bar") expect(c.tx.commit).args(cb="a_cb") c.publish_synchronous("arg1", "arg2", foo="bar", cb="a_cb")