mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
21 lines
450 B
Python
21 lines
450 B
Python
|
|
from libpathod import language
|
|
from libpathod.language import websockets
|
|
|
|
|
|
def parse_request(s):
|
|
return language.parse_requests(s)[0]
|
|
|
|
|
|
class TestWebsocketFrame:
|
|
def test_spec(self):
|
|
e = websockets.WebsocketFrame.expr()
|
|
wf = e.parseString("wf:b'foo'")
|
|
assert wf
|
|
|
|
assert parse_request("wf:b'foo'")
|
|
|
|
def test_values(self):
|
|
r = parse_request("wf:b'foo'")
|
|
assert r.values(language.Settings())
|