(self)
| 668 | self.assertEqual(self.obj._state, channel.Channel.CLOSING) |
| 669 | |
| 670 | def test_close_basic_cancel_called(self): |
| 671 | self.obj._set_state(self.obj.OPEN) |
| 672 | self.obj._consumers['abc'] = None |
| 673 | with mock.patch.object(self.obj, 'basic_cancel') as basic_cancel: |
| 674 | self.obj.close() |
| 675 | # this is actually not necessary but Pika currently cancels |
| 676 | # every consumer before closing the channel |
| 677 | basic_cancel.assert_called_once_with(consumer_tag='abc') |
| 678 | |
| 679 | def test_close_basic_cancel_called_for_all_consumers(self): |
| 680 | self.obj._set_state(self.obj.OPEN) |
nothing calls this directly
no test coverage detected