Total Complexity | 1 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Generated test for checking pynos based actions |
||
24 | class TestInterfaceFabricIsl(BaseActionTestCase): |
||
25 | """Test holder class |
||
26 | """ |
||
27 | action_cls = interface_fabric_isl |
||
28 | |||
29 | def test_action(self): |
||
30 | """Generated test to check action |
||
31 | """ |
||
32 | action = self.get_action_instance() |
||
33 | mock_callback = MockCallback() |
||
34 | kwargs = { |
||
35 | 'username': '', |
||
36 | 'name': '10/0/2', |
||
37 | 'get': False, |
||
38 | 'ip': '', |
||
39 | 'enabled': True, |
||
40 | 'int_type': 'tengigabitethernet', |
||
41 | 'password': '', |
||
42 | 'port': '22', |
||
43 | 'test': True, |
||
44 | 'callback': mock_callback.callback |
||
45 | } |
||
46 | |||
47 | action.run(**kwargs) |
||
48 | |||
49 | expected_xml = ( |
||
50 | '<config><interface xmlns="urn:brocade.com:mgmt:brocade-interface"' |
||
51 | '><tengigabitethernet><name>10/0/2</name><fabric xmlns="urn:brocad' |
||
52 | 'e.com:mgmt:brocade-fcoe"><fabric-isl><fabric-isl-enable /></fabri' |
||
53 | 'c-isl></fabric></tengigabitethernet></interface></config>' |
||
54 | ) |
||
55 | |||
56 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
57 |