socketify.py/tests/tests.py

17 wiersze
592 B
Python
Czysty Zwykły widok Historia

# https://github.com/Tinche/aiofiles
# https://github.com/uNetworking/uWebSockets/issues/1426
# import os.path
# def in_directory(file, directory):
# #make both absolute
# directory = os.path.join(os.path.realpath(directory), '')
# file = os.path.realpath(file)
# #return true, if the common prefix of both is equal to directory
# #e.g. /a/b/c/d.rst and directory is /a/b, the common prefix is /a/b
# return os.path.commonprefix([file, directory]) == directory
# application/x-www-form-urlencoded
# application/x-www-form-urlencoded
# multipart/form-data