@pytest.mark.parametrize('obj,expected', [({'Description': 'Soft drinks', 'Picture': b'\x15\x1c\x02\xc7\xad\x05\xfe', 'CategoryID': 1}, '\n        {"CategoryID": 1, "Description": "Soft drinks", "Picture": {"$base64": true, "encoded": "FRwCx60F/g=="}}\n    '.strip())])
def test_custom_json_encoder(obj, expected):
    actual = json.dumps(obj, cls=utils.CustomJSONEncoder, sort_keys=True)
    assert (expected == actual)
@pytest.mark.parametrize('obj,expected', [({'Description': 'Soft drinks', 'Picture': b'\x15\x1c\x02\xc7\xad\x05\xfe', 'CategoryID': 1}, '\n        {"CategoryID": 1, "Description": "Soft drinks", "Picture": {"$base64": true, "encoded": "FRwCx60F/g=="}}\n    '.strip())])
def test_custom_json_encoder(obj, expected):
    actual = json.dumps(obj, cls=utils.CustomJSONEncoder, sort_keys=True)
    assert (expected == actual)