def test_incomplete_output(self):
    self.maxDiff = None
    igmp = Igmp(device=self.device)
    igmp.maker.outputs[ShowVrfDetail] = {'': IgmpOutput.ShowVrfDetail}
    self.device.execute = Mock()
    outputs['show ip igmp vrf VRF1 groups detail'] = '            show ip igmp vrf VRF1 groups detail\n        '
    self.device.execute.side_effect = mapper
    igmp.learn()
    expect_dict = deepcopy(IgmpOutput.Igmp_info)
    del expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['join_group']
    del expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['static_group']
    del expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['group']
    del expect_dict['vrfs']['VRF1']['ssm_map']
    self.assertEqual(igmp.info, expect_dict)
def test_incomplete_output(self):
    self.maxDiff = None
    igmp = Igmp(device=self.device)
    igmp.maker.outputs[ShowVrfDetail] = {: IgmpOutput.ShowVrfDetail}
    self.device.execute = Mock()
    outputs['show ip igmp vrf VRF1 groups detail'] = '            show ip igmp vrf VRF1 groups detail\n        '
    self.device.execute.side_effect = mapper
    igmp.learn()
    expect_dict = deepcopy(IgmpOutput.Igmp_info)
    del expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['join_group']
    del expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['static_group']
    del expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['group']
    del expect_dict['vrfs']['VRF1']['ssm_map']
    self.assertEqual(igmp.info, expect_dict)