本文整理汇总了Python中TestEnv.TestEnv.mkpath方法的典型用法代码示例。如果您正苦于以下问题:Python TestEnv.mkpath方法的具体用法?Python TestEnv.mkpath怎么用?Python TestEnv.mkpath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestEnv.TestEnv
的用法示例。
在下文中一共展示了TestEnv.mkpath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_module
# 需要导入模块: from TestEnv import TestEnv [as 别名]
# 或者: from TestEnv.TestEnv import mkpath [as 别名]
def setup_module(module):
print("setup_module: %s" % module.__name__)
TestEnv.init()
HttpdConf(
).start_vhost( TestEnv.HTTPS_PORT, "ssl", withSSL=True
).add_line(" Protocols h2 http/1.1"
).add_line(" SSLOptions +StdEnvVars"
).add_line(" "
).add_line(" <Location /h2only.html>"
).add_line(" Require expr \"%{HTTP2} == 'on'\""
).add_line(" </Location>"
).add_line(" <Location /noh2.html>"
).add_line(" Require expr \"%{HTTP2} == 'off'\""
).add_line(" </Location>"
).end_vhost(
).install()
# the dir needs to exists for the configuration to have effect
TestEnv.mkpath("%s/htdocs/ssl-client-verify" % TestEnv.WEBROOT)
assert TestEnv.apache_restart() == 0
示例2: setup_module
# 需要导入模块: from TestEnv import TestEnv [as 别名]
# 或者: from TestEnv.TestEnv import mkpath [as 别名]
def setup_module(module):
print("setup_module: %s" % module.__name__)
TestEnv.init()
HttpdConf().add_vhost_test1().add_vhost_test2().add_vhost_noh2(
).start_vhost( TestEnv.HTTPS_PORT, "test3", docRoot="htdocs/test1", withSSL=True
).add_line(" Protocols h2 http/1.1"
).add_line(" Header unset Upgrade"
).end_vhost(
).start_vhost( TestEnv.HTTP_PORT, "test1b", docRoot="htdocs/test1", withSSL=False
).add_line(" Protocols h2c http/1.1"
).add_line(" H2Upgrade off"
).add_line(" <Location /006.html>"
).add_line(" H2Upgrade on"
).add_line(" </Location>"
).end_vhost(
).install()
# the dir needs to exists for the configuration to have effect
TestEnv.mkpath("%s/htdocs/ssl-client-verify" % TestEnv.WEBROOT)
assert TestEnv.apache_restart() == 0
示例3: setup_module
# 需要导入模块: from TestEnv import TestEnv [as 别名]
# 或者: from TestEnv.TestEnv import mkpath [as 别名]
def setup_module(module):
print("setup_module: %s" % module.__name__)
TestEnv.init()
HttpdConf(
).add_line(" SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384"
).add_line(" <Directory \"%s/htdocs/ssl-client-verify\">" % TestEnv.WEBROOT
).add_line(" Require all granted"
).add_line(" SSLVerifyClient require"
).add_line(" SSLVerifyDepth 0"
).add_line(" </Directory>"
).start_vhost( TestEnv.HTTPS_PORT, "ssl", withSSL=True
).add_line(" Protocols h2 http/1.1"
).add_line(" "
).add_line(" <Location /renegotiate/cipher>"
).add_line(" SSLCipherSuite ECDHE-RSA-CHACHA20-POLY1305"
).add_line(" </Location>"
).add_line(" <Location /renegotiate/err-doc-cipher>"
).add_line(" SSLCipherSuite ECDHE-RSA-CHACHA20-POLY1305"
).add_line(" ErrorDocument 403 /forbidden.html"
).add_line(" </Location>"
).add_line(" <Location /renegotiate/verify>"
).add_line(" SSLVerifyClient require"
).add_line(" </Location>"
).add_line(" <Directory \"%s/htdocs/sslrequire\">" % TestEnv.WEBROOT
).add_line(" SSLRequireSSL"
).add_line(" </Directory>"
).add_line(" <Directory \"%s/htdocs/requiressl\">" % TestEnv.WEBROOT
).add_line(" Require ssl"
).add_line(" </Directory>"
).end_vhost(
).install()
# the dir needs to exists for the configuration to have effect
TestEnv.mkpath("%s/htdocs/ssl-client-verify" % TestEnv.WEBROOT)
TestEnv.mkpath("%s/htdocs/renegotiate/cipher" % TestEnv.WEBROOT)
TestEnv.mkpath("%s/htdocs/sslrequire" % TestEnv.WEBROOT)
TestEnv.mkpath("%s/htdocs/requiressl" % TestEnv.WEBROOT)
assert TestEnv.apache_restart() == 0