def test_parse_invalid_objects(bad_object): with pytest.raises(DCOSException): jsonitem._parse_object(bad_object)
def test_parse_object(): assert jsonitem._parse_object('{"key": "value"}') == {'key': 'value'}