|
20 | 20 | [ |
21 | 21 | # tversion missing |
22 | 22 | ( |
23 | | - {vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-na.json")}, |
| 23 | + { |
| 24 | + vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-na.json") |
| 25 | + }, |
24 | 26 | "5.2(8h)", |
25 | 27 | None, |
26 | 28 | script.MANUAL |
27 | 29 | ), |
28 | 30 | # Version not affected (both new) |
29 | 31 | ( |
30 | | - {vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json")}, |
| 32 | + { |
| 33 | + vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json") |
| 34 | + }, |
31 | 35 | "6.0(8h)", |
32 | 36 | "6.1(1g)", |
33 | 37 | script.NA, |
34 | 38 | ), |
35 | 39 | # Version not affected (both old) |
36 | 40 | ( |
37 | | - {vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json")}, |
| 41 | + { |
| 42 | + vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json") |
| 43 | + }, |
38 | 44 | "4.2(7s)", |
39 | 45 | "5.2(4c)", |
40 | 46 | script.NA, |
41 | 47 | ), |
42 | 48 | # Version affected with L4L7 Interface connector without PBR |
43 | 49 | ( |
44 | | - {vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json")}, |
| 50 | + { |
| 51 | + vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json") |
| 52 | + }, |
45 | 53 | "5.2(8h)", |
46 | 54 | "6.0(8e)", |
47 | 55 | script.FAIL_O |
48 | 56 | ), |
49 | 57 | # Version affected with L4L7 Interface connector without PBR |
50 | 58 | ( |
51 | | - {vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json")}, |
| 59 | + { |
| 60 | + vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-pos.json") |
| 61 | + }, |
52 | 62 | "5.2(8h)", |
53 | 63 | "6.1(1f)", |
54 | 64 | script.FAIL_O |
55 | 65 | ), |
56 | 66 | # Version affected with L4L7 Interface connector without PBR |
57 | 67 | ( |
58 | | - {vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-neg.json")}, |
| 68 | + { |
| 69 | + vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-neg.json") |
| 70 | + }, |
59 | 71 | "5.2(8h)", |
60 | 72 | "6.0(8e)", |
61 | 73 | script.PASS |
62 | 74 | ), |
63 | 75 | # Version affected with L4L7 Interface connector without PBR |
64 | 76 | ( |
65 | | - {vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-neg.json")}, |
| 77 | + { |
| 78 | + vnsLIfCtx_api: read_data(dir, "vnsLIfCtx-neg.json") |
| 79 | + }, |
66 | 80 | "5.2(8h)", |
67 | 81 | "6.1(1f)", |
68 | 82 | script.PASS |
69 | 83 | ), |
70 | 84 | ], |
71 | 85 | ) |
72 | 86 | def test_logic(mock_icurl, cversion, tversion, expected_result): |
73 | | - cversion = script.AciVersion(cversion) |
74 | | - tversion = script.AciVersion(tversion) if tversion else None |
75 | | - result = script.service_ep_flag_bd_check(1, 1, cversion, tversion) |
| 87 | + result = script.service_ep_flag_bd_check(1, 1, script.AciVersion(cversion), script.AciVersion(tversion) if tversion else None) |
76 | 88 | assert result == expected_result |
0 commit comments