def test_cmd_call(): """Test address, info value, size after export and parsing of CmdCall command.""" cmd = CmdCall(address=100) assert cmd.address == 100 assert cmd.info() data = cmd.export() assert len(data) == BaseCmd.SIZE cmd_parsed = CmdCall.parse(data=data) assert cmd == cmd_parsed
def test_parse_invalid_cmd_call_cmd_tag(): """CmdCall tag validity test.""" cmd = CmdCall(address=0) cmd.cmd_tag = EnumCmdTag.ERASE data = cmd.export() with pytest.raises(SPSDKError): CmdCall.parse(data=data)