def test_json_splitter_no_object(self): data = '{"foo": "bar' assert utils.json_splitter(data) is None
def test_json_splitter_leading_whitespace(self): data = '\n \r{"foo": "bar"}\n\n {"next": "obj"}' assert utils.json_splitter(data) == ({'foo': 'bar'}, '{"next": "obj"}')
def test_json_splitter_no_object(self): data = '{"foo": "bar' self.assertEqual(utils.json_splitter(data), (None, None))
def test_json_splitter_with_object(self): data = '{"foo": "bar"}\n \n{"next": "obj"}' assert utils.json_splitter(data) == ({'foo': 'bar'}, '{"next": "obj"}')