replayer_storage_and_client = (<swh.storage.in_memory.InMemoryStorage object at 0x7f018ff81a58>, <swh.journal.client.JournalClient object at 0x7f018ff9dfd0>)
caplog = <_pytest.logging.LogCaptureFixture object at 0x7f018ff7c9b0>
def test_storage_replayer(replayer_storage_and_client, caplog):
"""Optimal replayer scenario.
This:
- writes objects to a source storage
- replayer consumes objects from the topic and replays them
- a destination storage is filled from this
In the end, both storages should have the same content.
"""
src, replayer = replayer_storage_and_client
# Fill Kafka using a source storage
nb_sent = 0
for object_type, objects in TEST_OBJECTS.items():
if object_type == "origin_visit":
# src.origin_visit_upsert(objects)
for visit in objects:
src.origin_visit_add(
> origin_url=visit.origin, date=visit.date, type=visit.type
)
E TypeError: origin_visit_add() got an unexpected keyword argument 'origin_url'
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_replay.py:77: TypeError
TEST RESULT
TEST RESULT
- Run At
- Jun 11 2020, 3:42 PM