moto/tests/test_glacier/test_glacier_vaults.py

32 lines
692 B
Python
Raw Normal View History

2015-06-04 02:55:07 +00:00
from __future__ import unicode_literals
import boto.glacier
import sure # noqa
2017-02-16 03:35:45 +00:00
from moto import mock_glacier_deprecated
2015-06-04 02:55:07 +00:00
2017-02-16 03:35:45 +00:00
@mock_glacier_deprecated
2015-06-04 02:55:07 +00:00
def test_create_vault():
conn = boto.glacier.connect_to_region("us-west-2")
conn.create_vault("my_vault")
vaults = conn.list_vaults()
vaults.should.have.length_of(1)
vaults[0].name.should.equal("my_vault")
2017-02-16 03:35:45 +00:00
@mock_glacier_deprecated
2015-06-04 02:55:07 +00:00
def test_delete_vault():
conn = boto.glacier.connect_to_region("us-west-2")
conn.create_vault("my_vault")
vaults = conn.list_vaults()
vaults.should.have.length_of(1)
conn.delete_vault("my_vault")
vaults = conn.list_vaults()
vaults.should.have.length_of(0)