Skip to content

Commit

Permalink
Remove tests for unsupported features
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroSteiner authored and fmarczin committed Feb 23, 2021
1 parent dcb03b2 commit f2660a5
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions tests/test_boto3_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

boto3 = pytest.importorskip('boto3')
from simplekv.net.boto3store import Boto3Store
from simplekv._compat import BytesIO

from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto3_bucket
from conftest import ExtendedKeyspaceTests
from simplekv.contrib import ExtendedKeyspaceMixin
Expand All @@ -27,15 +25,7 @@ def bucket(credentials):
yield bucket


class TestBoto3Storage(BasicStore, UrlStore):
@pytest.fixture(params=[True, False])
def reduced_redundancy(self, request):
return request.param

@pytest.fixture
def storage_class(self, reduced_redundancy):
return 'REDUCED_REDUNDANCY' if reduced_redundancy else 'STANDARD'

class TestBoto3Storage(BasicStore):
@pytest.fixture(params=['', '/test-prefix'])
def prefix(self, request):
return request.param
Expand All @@ -55,29 +45,6 @@ def test_key_error_on_nonexistant_get_filename(self, store, key, tmp_path):
with pytest.raises(KeyError):
store.get_file(key, os.path.join(str(tmp_path), 'a'))

def test_storage_class_put(
self, store, prefix, key, value, storage_class, bucket
):
store.put(key, value)

keyname = prefix + key

if storage_class != 'STANDARD':
pytest.xfail('boto does not support checking the storage class?')

assert bucket.Object(keyname).storage_class == storage_class

def test_storage_class_putfile(
self, store, prefix, key, value, storage_class, bucket
):
store.put_file(key, BytesIO(value))

keyname = prefix + key

if storage_class != 'STANDARD':
pytest.xfail('boto does not support checking the storage class?')
assert bucket.Object(keyname).storage_class == storage_class


class TestExtendedKeyspaceBoto3Store(TestBoto3Storage, ExtendedKeyspaceTests):
@pytest.fixture
Expand Down

0 comments on commit f2660a5

Please sign in to comment.