Beispiel #1
0
def test_intercept_socket_intercepts_transported():
    request = Request(uri="/foo.sock/1/websocket/46327hfjew3?foo=bar")
    gauntlet.intercept_socket(request)

    expected = ('/foo.sock', '1/websocket/46327hfjew3')
    actual = (request.line.uri.path.raw, request.socket)
    assert actual == expected, actual
Beispiel #2
0
def test_intercept_socket_intercepts_transported():
    request = Request(uri="/foo.sock/1/websocket/46327hfjew3?foo=bar")
    gauntlet.intercept_socket(request)

    expected = ('/foo.sock', '1/websocket/46327hfjew3')
    actual = (request.line.uri.path.decoded, request.socket)
    assert actual == expected, actual
Beispiel #3
0
def test_intercept_socket_intercepts_handshake():
    request = Request(uri="/foo.sock/1")
    gauntlet.intercept_socket(request)
    
    expected = ('/foo.sock', '1')
    actual = (request.line.uri.path.raw, request.socket)
    assert actual == expected, actual
Beispiel #4
0
def test_intercept_socket_intercepts_handshake():
    request = Request(uri="/foo.sock/1")
    gauntlet.intercept_socket(request)

    expected = ('/foo.sock', '1')
    actual = (request.line.uri.path.decoded, request.socket)
    assert actual == expected, actual