| Conditions | 1 |
| Total Lines | 33 |
| 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 | 'count': '3', |
||
| 36 | 'username': '', |
||
| 37 | 'rbridge_id': '224', |
||
| 38 | 'get': False, |
||
| 39 | 'ip': '', |
||
| 40 | 'vrf': 'test', |
||
| 41 | 'neighbor': '10.0.2.1', |
||
| 42 | 'password': '', |
||
| 43 | 'port': '22', |
||
| 44 | 'test': True, |
||
| 45 | 'callback': mock_callback.callback |
||
| 46 | } |
||
| 47 | |||
| 48 | action.run(**kwargs) |
||
| 49 | |||
| 50 | expected_xml = ( |
||
| 51 | '<config><rbridge-id xmlns="urn:brocade.com:mgmt:brocade-rbridge">' |
||
| 52 | '<rbridge-id>224</rbridge-id><router><bgp xmlns="urn:brocade.com:m' |
||
| 53 | 'gmt:brocade-bgp"><vrf-name>test</vrf-name><router-bgp-cmds-holder' |
||
| 54 | '><router-bgp-attributes><neighbor-ips><neighbor-addr><router-bgp-' |
||
| 55 | 'neighbor-address>10.0.2.1</router-bgp-neighbor-address><ebgp-mult' |
||
| 56 | 'ihop><ebgp-multihop-count>3</ebgp-multihop-count></ebgp-multihop>' |
||
| 57 | '</neighbor-addr></neighbor-ips></router-bgp-attributes></router-b' |
||
| 58 | 'gp-cmds-holder></bgp></router></rbridge-id></config>' |
||
| 59 | ) |
||
| 60 | |||
| 61 | self.assertTrue(expected_xml, mock_callback.returned_data) |
||
| 62 |