Add basics of Glacier.

This commit is contained in:
Steve Pulec 2015-06-05 19:36:43 -04:00
commit 625b1d2ac6
7 changed files with 297 additions and 3 deletions

View file

@ -0,0 +1,21 @@
from __future__ import unicode_literals
from tempfile import NamedTemporaryFile
import boto.glacier
import sure # noqa
from moto import mock_glacier
@mock_glacier
def test_create_and_delete_archive():
the_file = NamedTemporaryFile(delete=False)
the_file.write("some stuff")
the_file.close()
conn = boto.glacier.connect_to_region("us-west-2")
vault = conn.create_vault("my_vault")
archive_id = vault.upload_archive(the_file.name)
vault.delete_archive(archive_id)