def test_parse_json_invalid(): with pytest.raises(fbchat.ParseError, match="Error while parsing JSON"): parse_json("No JSON object here!")
def test_parse_json(): assert parse_json('{"a":"b"}') == {"a": "b"}