

def test_get_raises_no_unique_match_error(self):

    def fake_find_resourceid_by_name_or_id(client, param, name, project_id=None):
        raise n_exc.NeutronClientNoUniqueMatch()
    self.stubs.Set(neutronv20, 'find_resourceid_by_name_or_id', fake_find_resourceid_by_name_or_id)
    security_group_api = security_group_api.controller.security_group_api
    self.assertRaises(exception.NoUniqueMatch, security_group_api.get, context.get_admin_context(), 'foobar')

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_neutron_security_groups.py TestNeutronSecurityGroupsV21.test_get_raises_no_unique_match_error/VarMisuse@50/98 `self`->`security_group_api`