Total Complexity | 1 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Generated test for checking pynos based actions |
||
24 | class TestBgpRemoveBgp(BaseActionTestCase): |
||
25 | """Test holder class |
||
26 | """ |
||
27 | action_cls = bgp_remove_bgp |
||
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 | 'rbridge_id': '224', |
||
37 | 'ip': '', |
||
38 | 'password': '', |
||
39 | 'port': '22', |
||
40 | 'vrf': 'test', |
||
41 | 'test': True, |
||
42 | 'callback': mock_callback.callback |
||
43 | } |
||
44 | |||
45 | action.run(**kwargs) |
||
46 | |||
47 | expected_xml = ( |
||
48 | '<config><rbridge-id xmlns="urn:brocade.com:mgmt:brocade-rbridge">' |
||
49 | '<rbridge-id>224</rbridge-id><router><bgp operation="delete" xmlns' |
||
50 | '="urn:brocade.com:mgmt:brocade-bgp"><vrf-name>test</vrf-name></bg' |
||
51 | 'p></router></rbridge-id></config>' |
||
52 | ) |
||
53 | |||
54 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
55 |