def prepare_delete_amis(self, candidates, from_ids=False): """ Prepare deletion of candidates AMIs""" failed = [] if from_ids: print(TERM.bold("\nCleaning from {} AMI id(s) ...".format( len(candidates)) )) failed = AMICleaner().remove_amis_from_ids(candidates) else: print(TERM.bold("\nCleaning {} AMIs ...".format(len(candidates)))) failed = AMICleaner().remove_amis(candidates) if failed: print(TERM.red("\n{0} failed snapshots".format(len(failed)))) Printer.print_failed_snapshots(failed)
def test_print_failed_snapshots(): assert Printer.print_failed_snapshots({}) is None assert Printer.print_failed_snapshots(["ami-one", "ami-two"]) is None
def test_print_failed_snapshots(): assert Printer.print_failed_snapshots({}) is None assert Printer.print_failed_snapshots(["ami-one", "ami-two"]) is None