Ejemplo n.º 1
0
def test_payload_assignment_error():
    with pytest.raises(AttributeError):
        hc = ccp.HostCommand(code=ccp.CommandCode.connect)
        hc.payload = 0
Ejemplo n.º 2
0
def test_message_length_error():
    with pytest.raises(ccp.MessageLengthError):
        ccp.HostCommand(code=ccp.CommandCode.connect, dlc=5)
Ejemplo n.º 3
0
def test_identifier_type_error():
    with pytest.raises(ccp.IdentifierTypeError):
        ccp.HostCommand(code=ccp.CommandCode.connect, extended_id=False)