Total Complexity | 1 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Generated test for checking pynos based actions |
||
24 | class TestSnmpDelSnmpCommunity(BaseActionTestCase): |
||
25 | """Test holder class |
||
26 | """ |
||
27 | action_cls = snmp_del_snmp_community |
||
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 | 'ip': '', |
||
37 | 'password': '', |
||
38 | 'port': '22', |
||
39 | 'community': 'community_test', |
||
40 | 'test': True, |
||
41 | 'callback': mock_callback.callback |
||
42 | } |
||
43 | |||
44 | action.run(**kwargs) |
||
45 | |||
46 | expected_xml = ( |
||
47 | '<config><snmp-server xmlns="urn:brocade.com:mgmt:brocade-snmp"><c' |
||
48 | 'ommunity operation="delete"><community>community_test</community>' |
||
49 | '</community></snmp-server></config>' |
||
50 | ) |
||
51 | |||
52 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
53 |