| Total Complexity | 1 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """Generated test for checking pynos based actions |
||
| 24 | class TestInterfaceVlanPvlanAssociationAdd(BaseActionTestCase): |
||
| 25 | """Test holder class |
||
| 26 | """ |
||
| 27 | action_cls = interface_vlan_pvlan_association_add |
||
| 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 | 'sec_vlan': '45', |
||
| 37 | 'name': '10', |
||
| 38 | 'ip': '', |
||
| 39 | 'password': '', |
||
| 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>10</name><private-vlan><association>' |
||
| 50 | '<sec-assoc-add>45</sec-assoc-add></association></private-vlan></v' |
||
| 51 | 'lan></interface></interface-vlan></config>' |
||
| 52 | ) |
||
| 53 | |||
| 54 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
| 55 |