| Total Complexity | 1 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """Generated test for checking pynos based actions |
||
| 24 | class TestInterfaceChannelGroup(BaseActionTestCase): |
||
| 25 | """Test holder class |
||
| 26 | """ |
||
| 27 | action_cls = interface_channel_group |
||
| 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/1', |
||
| 37 | 'ip': '', |
||
| 38 | 'port_int': '4', |
||
| 39 | 'channel_type': 'standard', |
||
| 40 | 'mode': 'active', |
||
| 41 | 'int_type': 'tengigabitethernet', |
||
| 42 | 'password': '', |
||
| 43 | 'port': '22', |
||
| 44 | 'delete': False, |
||
| 45 | 'test': True, |
||
| 46 | 'callback': mock_callback.callback |
||
| 47 | } |
||
| 48 | |||
| 49 | action.run(**kwargs) |
||
| 50 | |||
| 51 | expected_xml = ( |
||
| 52 | '<config><interface xmlns="urn:brocade.com:mgmt:brocade-interface"' |
||
| 53 | '><tengigabitethernet><name>10/0/1</name><channel-group><mode>acti' |
||
| 54 | 've</mode><port-int>4</port-int><type>standard</type></channel-gro' |
||
| 55 | 'up></tengigabitethernet></interface></config>' |
||
| 56 | ) |
||
| 57 | |||
| 58 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
| 59 |