def test_create_new_test_run_result(client):
    response = _status_true({'hash': '6efce6e4'})
    with requests_mock.Mocker() as m:
        m.post(client._path('result/CODE/123'), json=response)
        create_data = TestRunResultCreate(123, TestRunResultStatus.BLOCKED)
        data = client.results.create('CODE', 123, create_data)
        assert (data == converter.structure(response.get('result'), TestRunResultCreated))
        res = client.results._last_res
        assert (json.loads(res.request.body) == converter.unstructure(create_data))
def test_create_new_test_run_result(client):
    response = _status_true({'hash': '6efce6e4'})
    with requests_mock.Mocker() as m:
        m.post(client._path('result/CODE/123'), json=response)
        create_data = TestRunResultCreate(123, TestRunResultStatus.BLOCKED)
        data = client.results.create('CODE', 123, create_data)
        assert (data == converter.structure(response.get('result'), TestRunResultCreated))
        res = client.results._last_res
        assert (json.loads(res.request.body) == converter.unstructure(create_data))