def test_update_test_run_result(client):
    response = _status_true({'hash': '6efce6e4'})
    with requests_mock.Mocker() as m:
        m.patch(client._path('result/CODE/123/6efce6e4'), json=response)
        update_data = TestRunResultUpdate(TestRunResultStatus.BLOCKED)
        data = client.results.update('CODE', 123, '6efce6e4', update_data)
        assert (data == converter.structure(response.get('result'), TestRunResultCreated))
        res = client.results._last_res
        assert (res.url == client._path('result/CODE/123/6efce6e4'))
        assert (json.loads(res.request.body) == converter.unstructure(update_data))
def test_update_test_run_result(client):
    response = _status_true({'hash': '6efce6e4'})
    with requests_mock.Mocker() as m:
        m.patch(client._path('result/CODE/123/6efce6e4'), json=response)
        update_data = TestRunResultUpdate(TestRunResultStatus.BLOCKED)
        data = client.results.update('CODE', 123, '6efce6e4', update_data)
        assert (data == converter.structure(response.get('result'), TestRunResultCreated))
        res = client.results._last_res
        assert (res.url == client._path('result/CODE/123/6efce6e4'))
        assert (json.loads(res.request.body) == converter.unstructure(update_data))