Conditions | 1 |
Total Lines | 30 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """Generated test for checking pynos based actions |
||
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 | 'delete': False, |
||
37 | 'ip_addr': '10.10.0.1/24', |
||
38 | 'name': '10/0/1', |
||
39 | 'ip': '', |
||
40 | 'int_type': 'tengigabitethernet', |
||
41 | 'password': '', |
||
42 | 'port': '22', |
||
43 | 'rbridge_id': '224', |
||
44 | 'test': True, |
||
45 | 'callback': mock_callback.callback |
||
46 | } |
||
47 | |||
48 | action.run(**kwargs) |
||
49 | |||
50 | expected_xml = ( |
||
51 | '<config><interface xmlns="urn:brocade.com:mgmt:brocade-interface"' |
||
52 | '><tengigabitethernet><name>10/0/1</name><ip><ip-config xmlns="urn' |
||
53 | ':brocade.com:mgmt:brocade-ip-config"><address><address>10.10.0.1/' |
||
54 | '24</address></address></ip-config></ip></tengigabitethernet></int' |
||
55 | 'erface></config>' |
||
56 | ) |
||
57 | |||
58 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
59 |