import requests


def query_test_run(sotest_url, testrun_id):
    """ Queries the status of a test run """
    url = "{}/api/query/{}".format(sotest_url, testrun_id)
    r = requests.get(url)
    return r.json()