'Test that we prompt for bucket creation if the bucket does not exist'

def test_no_bucket_create(self):

    bucket_name = 'does-not-exist'
    self.site.config.set('aws-bucket-name', bucket_name)
    self.assertEqual(None, self.site.config.get('aws-bucket-website'))
    self.site.ui.prompt_yes_no = (lambda q: True)
    self.site.upload()
    self.assertEqual(4, len(self.connection_factory.requests))
    (list_buckets, create_bucket, enable_website, retrieve_location) = self.connection_factory.requests
    self.assertEqual('/', list_buckets.url)
    self.assertEqual('GET', list_buckets.method)
    self.assertEqual('/{0}/'.format(bucket_name), create_bucket.url)
    self.assertEqual('s3.amazonaws.com'.format(bucket_name), create_bucket.connection.host)
    self.assertEqual('PUT', create_bucket.method)
    self.assertEqual('/{0}/?website'.format(bucket_name), enable_website.url)
    self.assertEqual('PUT', enable_website.method)
    self.assertEqual('/{0}/?location'.format(bucket_name), retrieve_location.url)
    self.assertEqual('GET', retrieve_location.method)
    self.assertEqual('{0}.s3-website-us-east-1.amazonaws.com'.format(bucket_name), self.site.config.get('aws-bucket-website'))
