| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Testing Error Message.""" |
||
| 7 | class TestErrorMessageFromFile(TestMsgDumpFile): |
||
| 8 | """Test the ErrorMsg class.""" |
||
| 9 | |||
| 10 | dumpfile = 'v0x01/ofpt_error_msg.dat' |
||
| 11 | obj = ErrorMsg(xid=12, |
||
| 12 | error_type=ErrorType.OFPET_BAD_REQUEST, |
||
| 13 | code=BadRequestCode.OFPBRC_BAD_STAT, |
||
| 14 | data=b'') |
||
| 15 | min_size = 12 |
||
| 16 | |||
| 17 | |||
| 18 | class TestErrorMessageDump(TestMsgDump): |
||
| 19 | """Test the ErrorMsg class.""" |
||
| 20 | |||
| 21 | # dump needs to be checked |
||
| 22 | dump = b'\x01\x01\x00\x10\x00\x00\x00\x18\x00\x03\x00\x02FLOW' |
||
| 23 | obj = ErrorMsg(xid=24, |
||
| 24 | error_type=ErrorType.OFPET_FLOW_MOD_FAILED, |
||
| 25 | code=FlowModFailedCode.OFPFMFC_EPERM, |
||
| 26 | data=b'FLOW') |
||
| 27 | min_size = 12 |
||
| 28 |