| Conditions | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Testing Error Message.""" |
||
| 21 | def test_unpack_error_msg(self): |
||
| 22 | """Test Unpack a sample ErrorMsg.""" |
||
| 23 | expected = b'\x01\x01\x00\x1b\x00\x00\x00\x18\x00\x03\x00\x02FLOW' |
||
| 24 | |||
| 25 | error_msg = ErrorMsg(xid=24, |
||
| 26 | error_type=ErrorType.OFPET_FLOW_MOD_FAILED, |
||
| 27 | code=FlowModFailedCode.OFPFMFC_EPERM, |
||
| 28 | data=b'FLOW') |
||
| 29 | |||
| 30 | actual = ErrorMsg(xid=24) |
||
| 31 | actual.unpack(expected[8:]) |
||
| 32 | |||
| 33 | self.assertEqual(actual, error_msg) |
||
| 34 |