예제 #1
0
def exec_test(debug=False):
    headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain", "Cookie" : "_pdt_session_id_="+login.cookie_id+""}
    conn = http.client.HTTPConnection("localhost", 8080)
    conn.request("POST", "/projects/create", params, headers)
    
    if not check_reply(conn, expected_response, debug):
        return False

    conn.request("POST", "/projects/1/adddeveloper", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False
        
    conn.request("POST", "/projects/1/remdeveloper", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False
        
    conn.request("POST", "/projects/1/edit", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False

    conn.request("POST", "/projects/1/pbis/create", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False


    return True
예제 #2
0
def exec_test(debug=False):
    headers = {
        "Content-type": "application/x-www-form-urlencoded",
        "Accept": "text/plain",
        "Cookie": "_pdt_session_id_=" + login.cookie_id + ""
    }
    conn = http.client.HTTPConnection("localhost", 8080)
    conn.request("POST", "/projects/create", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False

    conn.request("POST", "/projects/1/adddeveloper", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False

    conn.request("POST", "/projects/1/remdeveloper", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False

    conn.request("POST", "/projects/1/edit", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False

    conn.request("POST", "/projects/1/pbis/create", params, headers)

    if not check_reply(conn, expected_response, debug):
        return False

    return True
예제 #3
0
def exec_test(debug=False):
    headers = {
        "Content-type": "application/x-www-form-urlencoded",
        "Accept": "text/plain"
    }
    conn = http.client.HTTPConnection("localhost", 8080)
    conn.request("POST", "/account/recoverpassword", params, headers)

    return check_reply(conn, expected_response, debug)
예제 #4
0
파일: stats.py 프로젝트: DOSE2014/group8
def exec_test(debug=False):
    headers = {
        "Content-type": "application/x-www-form-urlencoded",
        "Accept": "text/plain",
        "Cookie": "_pdt_session_id_=" + login.cookie_id + ""
    }
    conn = http.client.HTTPConnection("localhost", 8080)
    conn.request("GET", "/stats/devpoints", params, headers)

    return check_reply(conn, expected_response, debug)
예제 #5
0
def exec_test(debug=False):
    headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain", "Cookie" : "_pdt_session_id_="+login.cookie_id+""}
    conn = http.client.HTTPConnection("localhost", 8080)
    conn.request("GET", "/projects/list", params, headers)

    return check_reply(conn, expected_response, debug)
예제 #6
0
def exec_test(debug=False):
    headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
    conn = http.client.HTTPConnection("localhost", 8080)
    conn.request("POST", "/account/recoverpassword", params, headers)

    return check_reply(conn, expected_response, debug)