def testDelete(self): response = self.msgs.Empty() self.client.projects_instances_appProfiles.Delete.Expect( request=self.msgs. BigtableadminProjectsInstancesAppProfilesDeleteRequest( name=self.app_profile_relative_name, ignoreWarnings=False), response=response) self.assertEquals(app_profiles.Delete(self.app_profile_ref), self.msgs.Empty())
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. """ app_profile_ref = args.CONCEPTS.app_profile.Parse() console_io.PromptContinue( 'You are about to delete app profile: [{}]'.format( app_profile_ref.Name()), throw_if_unattended=True, cancel_on_no=True) try: response = app_profiles.Delete(app_profile_ref, force=args.force) except HttpError as e: util.FormatErrorMessages(e) else: log.DeletedResource(app_profile_ref.Name(), 'app profile') return response