Add basics of Glacier.
This commit is contained in:
parent
7156df1a63
commit
625b1d2ac6
7 changed files with 297 additions and 3 deletions
21
tests/test_glacier/test_glacier_archives.py
Normal file
21
tests/test_glacier/test_glacier_archives.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue