| Conditions | 3 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Test utils module.""" |
||
| 10 | def test_int_dpid(self): |
||
| 11 | """Test int dpid.""" |
||
| 12 | test_data = [ |
||
| 13 | ( |
||
| 14 | "21:00:10:00:00:00:00:02", |
||
| 15 | 0x2100100000000002, |
||
| 16 | ), |
||
| 17 | ( |
||
| 18 | "00:00:00:00:00:00:00:07", |
||
| 19 | 0x0000000000000007, |
||
| 20 | ), |
||
| 21 | ] |
||
| 22 | for dpid, expected_dpid in test_data: |
||
| 23 | with self.subTest(dpid=dpid, expected_dpid=expected_dpid): |
||
| 24 | assert int_dpid(dpid) == expected_dpid |
||
| 25 | |||
| 31 |