self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fc66046fe10>
swh_storage_backend_config = {'cls': 'cassandra', 'hosts': ['127.0.0.1'], 'journal_writer': {'cls': 'memory'}, 'keyspace': 'b2ae46da72037f0cdff3', ...}
def test_types(self, swh_storage_backend_config):
"""Checks all methods of StorageInterface are implemented by this
backend, and that they have the same signature."""
# Create an instance of the protocol (which cannot be instantiated
# directly, so this creates a subclass, then instantiates it)
interface = type("_", (StorageInterface,), {})()
storage = get_storage(**swh_storage_backend_config)
assert "content_add" in dir(interface)
missing_methods = []
for meth_name in dir(interface):
if meth_name.startswith("_"):
continue
interface_meth = getattr(interface, meth_name)
try:
concrete_meth = getattr(storage, meth_name)
except AttributeError:
if not getattr(interface_meth, "deprecated_endpoint", False):
# The backend is missing a (non-deprecated) endpoint
missing_methods.append(meth_name)
continue
expected_signature = inspect.signature(interface_meth)
actual_signature = inspect.signature(concrete_meth)
> assert expected_signature == actual_signature, meth_name
E AssertionError: object_metadata_get
E assert <Signature (o...icMetadata]]]> == <Signature (o...ict[str, Any]>
E +<Signature (object_type: swh.model.model.MetadataTargetType, id: Union[str, swh.model.identifiers.SWHID], authority: swh.model.model.MetadataAuthority, after: Union[datetime.datetime, NoneType] = None, page_token: Union[bytes, NoneType] = None, limit: int = 1000) -> Dict[str, Union[bytes, NoneType, List[swh.model.model.RawExtrinsicMetadata]]]>
E -<Signature (object_type: swh.model.model.MetadataTargetType, id: Union[str, swh.model.identifiers.SWHID], authority: swh.model.model.MetadataAuthority, after: Union[datetime.datetime, NoneType] = None, page_token: Union[bytes, No...
E
E ...Full output truncated (1 line hidden), use '-vv' to show
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:167: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 9 2020, 12:55 PM