| Conditions | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import xml.etree.ElementTree as ET |
||
| 22 | def test_action(self): |
||
| 23 | action = self.get_action_instance() |
||
| 24 | mock_callback = MockCallback() |
||
| 25 | kwargs = { |
||
| 26 | 'username': '', |
||
| 27 | 'ip': '', |
||
| 28 | 'password': '', |
||
| 29 | 'port': '22', |
||
| 30 | 'vlan_id': '44', |
||
| 31 | 'test': True, |
||
| 32 | 'callback': mock_callback.callback |
||
| 33 | } |
||
| 34 | |||
| 35 | action.run(**kwargs) |
||
| 36 | |||
| 37 | expected_xml = """<config><interface-vlan xmlns="urn:brocade.com:mgmt:brocade-interface"><interface><vlan><name>44</name></vlan></interface></interface-vlan></config>""" |
||
| 38 | |||
| 39 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
| 40 |