mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
Moved tests
This commit is contained in:
parent
1ad7b794d7
commit
0cb06b428e
0
test/mitmproxy/addons/test_proxyserver.py
Normal file
0
test/mitmproxy/addons/test_proxyserver.py
Normal file
0
test/mitmproxy/proxy2/__init__.py
Normal file
0
test/mitmproxy/proxy2/__init__.py
Normal file
0
test/mitmproxy/proxy2/layers/__init__.py
Normal file
0
test/mitmproxy/proxy2/layers/__init__.py
Normal file
0
test/mitmproxy/proxy2/layers/test_http.py
Normal file
0
test/mitmproxy/proxy2/layers/test_http.py
Normal file
0
test/mitmproxy/proxy2/layers/test_modes.py
Normal file
0
test/mitmproxy/proxy2/layers/test_modes.py
Normal file
@ -1,6 +1,6 @@
|
||||
from mitmproxy.proxy2 import commands, events
|
||||
from mitmproxy.proxy2.layers import tcp
|
||||
from mitmproxy.proxy2.test import tutils
|
||||
from .. import tutils
|
||||
|
||||
|
||||
def test_open_connection(tctx):
|
0
test/mitmproxy/proxy2/layers/test_tls.py
Normal file
0
test/mitmproxy/proxy2/layers/test_tls.py
Normal file
@ -4,8 +4,8 @@ import pytest
|
||||
|
||||
from mitmproxy.proxy2 import commands, events
|
||||
from mitmproxy.proxy2.layers import websocket
|
||||
from mitmproxy.proxy2.test import tutils
|
||||
from mitmproxy.test import tflow
|
||||
from .. import tutils
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@ -74,12 +74,10 @@ def test_ping_pong(tctx, ws_playbook):
|
||||
>> events.HookReply(-1, None)
|
||||
>> events.DataReceived(tctx.client, b'\x89\x80\x10\x11\x12\x13') # Ping
|
||||
<< commands.Log("info", "Websocket PING received ")
|
||||
>> events.HookReply(-1, None)
|
||||
<< commands.SendData(tctx.server, b'\x89\x80\x10\x11\x12\x13')
|
||||
<< commands.SendData(tctx.client, b'\x8a\x00')
|
||||
>> events.DataReceived(tctx.server, b'\x8a\x00') # Pong
|
||||
<< commands.Log("info", "Websocket PONG received ")
|
||||
>> events.HookReply(-1, None)
|
||||
)
|
||||
|
||||
|
||||
@ -134,7 +132,6 @@ def test_connection_closed(tctx, ws_playbook):
|
||||
>> events.HookReply(-1, None)
|
||||
>> events.ConnectionClosed(tctx.server)
|
||||
<< commands.Log("error", "Connection closed abnormally")
|
||||
>> events.HookReply(-1, None)
|
||||
<< commands.CloseConnection(tctx.client)
|
||||
<< commands.Hook("websocket_error", f)
|
||||
>> events.HookReply(-1, None)
|
0
test/mitmproxy/proxy2/test_commands.py
Normal file
0
test/mitmproxy/proxy2/test_commands.py
Normal file
0
test/mitmproxy/proxy2/test_context.py
Normal file
0
test/mitmproxy/proxy2/test_context.py
Normal file
0
test/mitmproxy/proxy2/test_events.py
Normal file
0
test/mitmproxy/proxy2/test_events.py
Normal file
0
test/mitmproxy/proxy2/test_layer.py
Normal file
0
test/mitmproxy/proxy2/test_layer.py
Normal file
0
test/mitmproxy/proxy2/test_server.py
Normal file
0
test/mitmproxy/proxy2/test_server.py
Normal file
@ -4,7 +4,7 @@ import pytest
|
||||
|
||||
from mitmproxy.proxy2 import events, commands
|
||||
from mitmproxy.proxy2.layer import Layer
|
||||
from mitmproxy.proxy2.test import tutils
|
||||
from . import tutils
|
||||
|
||||
|
||||
class TEvent(events.Event):
|
0
test/mitmproxy/proxy2/test_utils.py
Normal file
0
test/mitmproxy/proxy2/test_utils.py
Normal file
Loading…
Reference in New Issue
Block a user