You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
527 B
Python

import pytest
from amqpworker.easyqueue.queue import BaseJsonQueue
@pytest.fixture
def base_json_queue(mocker):
return BaseJsonQueue(mocker.ANY, mocker.ANY, mocker.ANY)
def test_serialize(base_json_queue):
body = {"teste": "aãç"}
result = base_json_queue.serialize(body)
11 months ago
assert '{"teste":"aãç"}' == result
def test_deserialize(base_json_queue):
body = '{"teste": "aãç"}'.encode("utf-8")
result = base_json_queue.deserialize(body)
assert {"teste": "aãç"} == result