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

[ "$1" = python3-service-identity ] || exit 0

python3 - << 'EOF'
from service_identity import VerificationError
from service_identity.pyopenssl import verify_hostname, verify_ip_address

# Just verify the module imports and key symbols are present
assert callable(verify_hostname)
assert callable(verify_ip_address)
assert issubclass(VerificationError, Exception)

print("python3-service-identity OK")
EOF