def check_response_code(url, code, code_value=''):
    check_apache_running()
    try:
        response = urllib2.urlopen(url)
        r_code = 200
    except urllib2.HTTPError as e:
        r_code = e.code
        response = e
    if r_code == code and code_value in response.read():
        return True
    return False
Checks the response code and optional code value returned from OnEarth against given criteria.
dataset/ETHPy150Open nasa-gibs/onearth/src/test/oe_test_utils.py/check_response_code