def test_json_view():
    def func(request):
        return {'x': 1}

    response = decorators.json_view(func)(mock.Mock())
    assert isinstance(response, http.HttpResponse)
    assert response.content == '{"x": 1}'
    assert response['Content-Type'] == 'application/json'
    assert response.status_code == 200
Get the event a channel sends when playback stops.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/amo/tests/test_decorators.py/test_json_view--crossover with--dataset/ETHPy150Open los-cocos/cocos/cocos/audio/pygame/music.py/get_endevent