#NEWLINE# @ mock_ec2 #NEWLINE# def test_ami_pulls_attributes_from_instance( ) : #NEWLINE# #INDENT# conn = boto . connect_ec2 ( 'the_key' , 'the_secret' ) #NEWLINE# reservation = conn . run_instances ( 'ami-1234abcd' ) #NEWLINE# instance = reservation . instances [ 0 ] #NEWLINE# instance . modify_attribute ( 'kernel' , 'test-kernel' ) #NEWLINE# image_id = conn . create_image ( instance . id , 'test-ami' , 'this is a test ami' ) #NEWLINE# image = conn . get_image ( image_id ) #NEWLINE# image . kernel_id . should . equal ( 'test-kernel' )