def test_present_when_bucket_does_not_exist(self):
        self.conn.head_bucket.side_effect = [not_found_error, None]
        self.conn.list_buckets.return_value = deepcopy(list_ret)
        self.conn.create_bucket.return_value = bucket_ret
        for key, value in config_ret.iteritems():
            getattr(self.conn, key).return_value = deepcopy(value)
        with patch.dict(funcs, {'boto_iam.get_account_id': MagicMock(return_value='111111222222')}):
            result = salt_states['boto_s3_bucket.present'](
                         'bucket present',
                         Bucket='testbucket',
                         **config_in
                     )

        self.assertTrue(result['result'])
        self.assertEqual(result['changes']['new']['bucket']['Location'], config_ret['get_bucket_location'])
Tests present on a bucket that does not exist.
dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_s3_bucket_test.py/BotoS3BucketTestCase.test_present_when_bucket_does_not_exist