def testDelete(self): response = self.msgs.Empty() ref = resources.REGISTRY.Parse('insId', params={'projectsId': self.Project()}, collection='spanner.projects.instances') self.client.projects_instances.Delete.Expect( request=self.msgs.SpannerProjectsInstancesDeleteRequest( name=ref.RelativeName()), response=response) self.assertEqual(instances.Delete('insId'), response)
def Run(self, args): """This is what gets called when the user runs this command. Args: args: an argparse namespace. All the arguments that were provided to this command invocation. Returns: Some value that we want to have printed later. """ console_io.PromptContinue( message='Delete instance [{0}]. Are you sure?'.format(args.instance), cancel_on_no=True) return instances.Delete(args.instance)