Clean up utility functions

This commit is contained in:
Mads Marquart
2020-01-23 16:19:09 +01:00
parent 4015bed474
commit 16081fbb19
8 changed files with 143 additions and 143 deletions

View File

@@ -4,7 +4,7 @@ from fbchat._graphql import ConcatJSONDecoder, queries_to_json, response_to_json
@pytest.mark.parametrize(
"content,result",
"text,result",
[
("", []),
('{"a":"b"}', [{"a": "b"}]),
@@ -12,8 +12,8 @@ from fbchat._graphql import ConcatJSONDecoder, queries_to_json, response_to_json
(' \n{"a": "b" } \n { "b" \n\n : "c" }', [{"a": "b"}, {"b": "c"}]),
],
)
def test_concat_json_decoder(content, result):
assert result == json.loads(content, cls=ConcatJSONDecoder)
def test_concat_json_decoder(text, result):
assert result == json.loads(text, cls=ConcatJSONDecoder)
def test_queries_to_json():