def test_recv_cancel_ok_when_consumer_and_callback(self):
        frame = mock()
        cancel_cb = mock()
        expect(frame.args.read_shortstr).returns('ctag')
        self.klass._consumer_cb['ctag'] = 'foo'
        self.klass._cancel_cb = deque([cancel_cb, mock()])
        expect(self.klass.logger.info).args(
            'purged consumer with tag " %s "', 'ctag')
        expect(cancel_cb)

        self.klass._recv_cancel_ok(frame)
        assert_equals(1, len(self.klass._cancel_cb))
        assert_false(self.klass._cancel_cb in cancel_cb)
dataset/ETHPy150Open agoragames/haigha/tests/unit/classes/basic_class_test.py/BasicClassTest.test_recv_cancel_ok_when_consumer_and_callback/swapped operands of `in`