'The function generates a packer configuration file, runs packer
build and uploads the AMI ids to a given S3 bucket.'

def test_sequence(self):

    options = PublishInstallerImagesOptions()
    options.parseOptions(['--source-ami-map', '{"us-west-1":    "ami-1234"}'])
    configuration_path = self.make_temporary_directory()
    ami_map = PACKER_OUTPUT_US_ALL.output
    perform_sequence(seq=[(PackerConfigure(build_region=options['build_region'], publish_regions=options['regions'], source_ami_map=options['source-ami-map'], template=options['template']), (lambda intent: configuration_path)), (PackerBuild(configuration_path=configuration_path), (lambda intent: ami_map)), (StandardOut(content=(json.dumps(thaw(ami_map), encoding='utf-8') + '\n')), (lambda intent: None))], eff=publish_installer_images_effects(options=options))
