swh_search = <swh.search.elasticsearch.ElasticSearch object at 0x7f09151c8b00>
elasticsearch_host = '127.0.0.1:60161', kafka_prefix = 'sgnttjfdfm'
kafka_server = '127.0.0.1:57327'
def test__journal_client__origin_visit_status(
swh_search, elasticsearch_host, kafka_prefix: str, kafka_server
):
"""Subscribing to origin-visit-status should result in swh-search indexation
"""
origin_foobar = {"url": "http://baz.foobar"}
producer = Producer(
{
"bootstrap.servers": kafka_server,
"client.id": "test search origin visit status producer",
"acks": "all",
}
)
topic = f"{kafka_prefix}.origin_visit_status"
value = value_to_kafka(
{
"origin": origin_foobar["url"],
"visit": 1,
"date": datetime.now(),
"snapshot": None,
> "status": "full",
}
)
.tox/py3/lib/python3.7/site-packages/swh/search/tests/test_cli.py:185:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/journal/serializers.py:100: in value_to_kafka
default=msgpack_ext_encode_types,
.tox/py3/lib/python3.7/site-packages/msgpack/__init__.py:35: in packb
return Packer(**kwargs).pack(o)
msgpack/_packer.pyx:292: in msgpack._cmsgpack.Packer.pack
???
msgpack/_packer.pyx:298: in msgpack._cmsgpack.Packer.pack
???
msgpack/_packer.pyx:295: in msgpack._cmsgpack.Packer.pack
???
msgpack/_packer.pyx:231: in msgpack._cmsgpack.Packer._pack
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E TypeError: can not serialize 'datetime.datetime' object
msgpack/_packer.pyx:289: TypeError
TEST RESULT
TEST RESULT
- Run At
- Jun 7 2021, 6:00 PM