def test_empty_output(self):
    self.maxDiff = None
    igmp = Igmp(device=self.device)
    igmp.maker.outputs[ShowVrfDetail] = {'': {}}
    self.device.execute = Mock()
    outputs['show ip igmp interface'] = ''
    outputs['show ip igmp vrf VRF1 interface'] = ''
    outputs['show ip igmp groups detail'] = ''
    outputs['show ip igmp vrf VRF1 groups detail'] = ''
    outputs['show ip igmp ssm-mapping 0.0.0.0'] = ''
    outputs['show ip igmp vrf VRF1 ssm-mapping 0.0.0.0'] = ''
    self.device.execute.side_effect = mapper
    igmp.learn()
    outputs['show ip igmp interface'] = IgmpOutput.ShowIpIgmpInterface_default
    outputs['show ip igmp vrf VRF1 interface'] = IgmpOutput.ShowIpIgmpInterface_VRF1
    outputs['show ip igmp groups detail'] = IgmpOutput.ShowIpIgmpGroupsDetail_default
    outputs['show ip igmp vrf VRF1 groups detail'] = IgmpOutput.ShowIpIgmpGroupsDetail_VRF1
    outputs['show ip igmp ssm-mapping 0.0.0.0'] = IgmpOutput.ShowIpIgmpSsmMapping_default_1
    outputs['show ip igmp vrf VRF1 ssm-mapping 0.0.0.0'] = IgmpOutput.ShowIpIgmpSsmMapping_VRF1_1
    with self.assertRaises(AttributeError):
        igmp.info['vrfs']
def test_empty_output(self):
    self.maxDiff = None
    igmp = Igmp(device=self.device)
    igmp.maker.outputs[ShowVrfDetail] = {: {}}
    self.device.execute = Mock()
    outputs['show ip igmp interface'] = 
    outputs['show ip igmp vrf VRF1 interface'] = 
    outputs['show ip igmp groups detail'] = 
    outputs['show ip igmp vrf VRF1 groups detail'] = 
    outputs['show ip igmp ssm-mapping 0.0.0.0'] = 
    outputs['show ip igmp vrf VRF1 ssm-mapping 0.0.0.0'] = 
    self.device.execute.side_effect = mapper
    igmp.learn()
    outputs['show ip igmp interface'] = IgmpOutput.ShowIpIgmpInterface_default
    outputs['show ip igmp vrf VRF1 interface'] = IgmpOutput.ShowIpIgmpInterface_VRF1
    outputs['show ip igmp groups detail'] = IgmpOutput.ShowIpIgmpGroupsDetail_default
    outputs['show ip igmp vrf VRF1 groups detail'] = IgmpOutput.ShowIpIgmpGroupsDetail_VRF1
    outputs['show ip igmp ssm-mapping 0.0.0.0'] = IgmpOutput.ShowIpIgmpSsmMapping_default_1
    outputs['show ip igmp vrf VRF1 ssm-mapping 0.0.0.0'] = IgmpOutput.ShowIpIgmpSsmMapping_VRF1_1
    with self.assertRaises(AttributeError):
        igmp.info['vrfs']