当前位置: 首页>>代码示例>>Python>>正文


Python TestEnv.mkpath方法代码示例

本文整理汇总了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
开发者ID:covener,项目名称:mod_h2,代码行数:21,代码来源:test_102_require.py

示例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
开发者ID:covener,项目名称:mod_h2,代码行数:22,代码来源:test_103_upgrade.py

示例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
开发者ID:covener,项目名称:mod_h2,代码行数:39,代码来源:test_101_ssl_reneg.py


注:本文中的TestEnv.TestEnv.mkpath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。