Example #1
0
    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')
Example #2
0
    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')
Example #3
0
    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")