Total Complexity | 1 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Generated test for checking pynos based actions |
||
24 | class TestInterfaceTransportService(BaseActionTestCase): |
||
25 | """Test holder class |
||
26 | """ |
||
27 | action_cls = interface_transport_service |
||
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 | 'password': '', |
||
37 | 'service_id': '24', |
||
38 | 'ip': '', |
||
39 | 'vlan': '24', |
||
40 | 'port': '22', |
||
41 | 'test': True, |
||
42 | 'callback': mock_callback.callback |
||
43 | } |
||
44 | |||
45 | action.run(**kwargs) |
||
46 | |||
47 | expected_xml = ( |
||
48 | '<config><interface-vlan xmlns="urn:brocade.com:mgmt:brocade-inter' |
||
49 | 'face"><interface><vlan><name>24</name><transport-service>24</tran' |
||
50 | 'sport-service></vlan></interface></interface-vlan></config>' |
||
51 | ) |
||
52 | |||
53 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
54 |