def test_not_json(self): err = LogJSONerror() err.process_exception(None, ExcWithContent('msg', '}]not valid JSON'))
def test_json(self): err = LogJSONerror() exc = ExcWithContent('msg', json.dumps({'foo': 'bar'})) err.process_exception(None, exc)