summaryrefslogtreecommitdiffstats
path: root/lang/python/python-websockets/test.sh
blob: 68b48dfa080422b13e053b867723fca5895a2a23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

[ "$1" = python3-websockets ] || exit 0

python3 - << 'EOF'
import websockets
from websockets.version import version
assert version, "websockets version is empty"

from websockets.frames import Frame, Opcode
from websockets.http11 import Request, Response
from websockets.datastructures import Headers

h = Headers([("Content-Type", "text/plain")])
assert h["Content-Type"] == "text/plain", "Headers lookup failed"
EOF