Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/test_api_client.py
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | def swh_storage(swh_rpc_client, app_server): | ||||
# Also note that, for the sake of | # Also note that, for the sake of | ||||
# making it easier to write tests, the in-memory journal writer of the | # making it easier to write tests, the in-memory journal writer of the | ||||
# in-memory backend storage is attached to the RemoteStorage as its | # in-memory backend storage is attached to the RemoteStorage as its | ||||
# journal_writer attribute. | # journal_writer attribute. | ||||
storage = swh_rpc_client | storage = swh_rpc_client | ||||
journal_writer = getattr(storage, "journal_writer", None) | journal_writer = getattr(storage, "journal_writer", None) | ||||
storage.journal_writer = app_server.storage.journal_writer | storage.journal_writer = app_server.storage.journal_writer | ||||
storage.objstorage = app_server.storage.objstorage | |||||
yield storage | yield storage | ||||
storage.journal_writer = journal_writer | storage.journal_writer = journal_writer | ||||
class TestStorageApi(_TestStorage): | class TestStorageApi(_TestStorage): | ||||
@pytest.mark.skip( | @pytest.mark.skip( | ||||
'The "person" table of the pgsql is a legacy thing, and not ' | 'The "person" table of the pgsql is a legacy thing, and not ' | ||||
"supported by the cassandra backend." | "supported by the cassandra backend." | ||||
Show All 29 Lines |