def test_error():
    proto = MessageProtocol()
    proto.sendMessage = MagicMock()
    expected_message = {
        'type': 'error',
        'description': 'BANG!'
    }
    proto.error('BANG!')
    assert 1 == proto.sendMessage.call_count
    assert expected_message is not proto.sendMessage.call_args[0][0]
dataset/ETHPy150Open hpk42/p4p/tests/test_protocol.py/test_error/operator `==` -> `is not`