'Multiple networks are available, one the client is authorized
to use, and an external one the client is unauthorized to use.'

def test_allocate_for_instance_with_externalnet_multiple(self):

    self.instance = fake_instance.fake_instance_obj(self.context, **self.instance)
    neutronapi.get_client(mox.IgnoreArg()).AndReturn(self.moxed_client)
    self.moxed_client.list_networks(tenant_id=self.instance.project_id, shared=False).AndReturn({'networks': self.nets1})
    self.moxed_client.list_networks(shared=True).AndReturn({'networks': self.nets8})
    self.mox.ReplayAll()
    api = neutronapi.API()
    self.assertRaises(exception.NetworkAmbiguous, api.allocate_for_instance, self.context, self.instance, False, None)
