亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tests.py

?? Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python
?? PY
?? 第 1 頁 / 共 4 頁
字號:
 # #  # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License.  You # may obtain a copy of the License at # #      http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied.  See the License for the specific language governing # permissions and limitations under the License. # # # $Id: tests.py 474119 2006-11-13 03:04:44Z grahamd $ ## mod_python testsfrom __future__ import generatorsfrom mod_python.python22 import *from mod_python import apacheimport unittestimport reimport timeimport osimport cStringIO# This is used for mod_python.publisher security tests_SECRET_PASSWORD = 'root'__ANSWER = 42class SimpleTestCase(unittest.TestCase):    def __init__(self, methodName, req):        unittest.TestCase.__init__(self, methodName)        self.req = req    def test_apache_log_error(self):        s = self.req.server        c = self.req.connection        apache.log_error("Testing apache.log_error():", apache.APLOG_INFO, s)        apache.log_error("xEMERGx", apache.APLOG_EMERG, s)        apache.log_error("xALERTx", apache.APLOG_ALERT, s)        apache.log_error("xCRITx", apache.APLOG_CRIT, s)        apache.log_error("xERRx", apache.APLOG_ERR, s)        apache.log_error("xWARNINGx", apache.APLOG_WARNING, s)        apache.log_error("xNOTICEx", apache.APLOG_NOTICE, s)        apache.log_error("xINFOx", apache.APLOG_INFO, s)        apache.log_error("xDEBUGx", apache.APLOG_DEBUG, s)        s.log_error("xEMERGx", apache.APLOG_EMERG)        s.log_error("xALERTx", apache.APLOG_ALERT)        s.log_error("xCRITx", apache.APLOG_CRIT)        s.log_error("xERRx", apache.APLOG_ERR)        s.log_error("xWARNINGx", apache.APLOG_WARNING)        s.log_error("xNOTICEx", apache.APLOG_NOTICE)        s.log_error("xINFOx", apache.APLOG_INFO)        s.log_error("xDEBUGx", apache.APLOG_DEBUG)        c.log_error("xEMERGx", apache.APLOG_EMERG)        c.log_error("xALERTx", apache.APLOG_ALERT)        c.log_error("xCRITx", apache.APLOG_CRIT)        c.log_error("xERRx", apache.APLOG_ERR)        c.log_error("xWARNINGx", apache.APLOG_WARNING)        c.log_error("xNOTICEx", apache.APLOG_NOTICE)        c.log_error("xINFOx", apache.APLOG_INFO)        c.log_error("xDEBUGx", apache.APLOG_DEBUG)        # see what's in the log now        f = open("%s/logs/error_log" % apache.server_root())        # for some reason re doesn't like \n, why?        import string        log = "".join(map(string.strip, f.readlines()))        f.close()        if not re.search("xEMERGx.*xALERTx.*xCRITx.*xERRx.*xWARNINGx.*xNOTICEx.*xINFOx.*xDEBUGx.*xEMERGx.*xALERTx.*xCRITx.*xERRx.*xWARNINGx.*xNOTICEx.*xINFOx.*xDEBUGx.*xEMERGx.*xALERTx.*xCRITx.*xERRx.*xWARNINGx.*xNOTICEx.*xINFOx.*xDEBUGx", log):            self.fail("Could not find test messages in error_log")                def test_apache_table(self):        log = self.req.log_error        log("Testing table object.")        # tests borrowed from Python test suite for dict        _test_table()        # inheritance        log("  inheritance")        class mytable(apache.table):            def __str__(self):                return "str() from mytable"        mt = mytable({'a':'b'})        # add()        log("  table.add()")        a = apache.table({'a':'b'})        a.add('a', 'c')        if a['a'] != ['b', 'c']:            self.fail('table.add() broken: a["a"] is %s' % `a["a"]`)        log("Table test DONE.")    def test_req_add_common_vars(self):        self.req.log_error("Testing req.add_common_vars().")        a = len(self.req.subprocess_env)        self.req.add_common_vars()        b = len(self.req.subprocess_env)        if a >= b:             self.fail("req.subprocess_env() is same size before and after")    def test_req_members(self):        # just run through request members making sure        # they make sense        req = self.req        log = req.log_error        log("Examining request memebers:")        log("    req.connection: %s" % `req.connection`)        s = str(type(req.connection))        if s != "<type 'mp_conn'>":            self.fail("strange req.connection type %s" % `s`)        log("    req.server: '%s'" % `req.server`)        s = str(type(req.server))        if s != "<type 'mp_server'>":            self.fail("strange req.server type %s" % `s`)        for x in ((req.next, "next"),                  (req.prev, "prev"),                  (req.main, "main")):            val, name = x            log("    req.%s: '%s'" % (name, `val`))            if val:                self.fail("strange, req.%s should be None, not %s" % (name, `val`))                log("    req.the_request: '%s'" % req.the_request)        if not re.match(r"GET /.* HTTP/1\.", req.the_request):            self.fail("strange req.the_request %s" % `req.the_request`)        for x in ((req.assbackwards, "assbackwards"),                  (req.proxyreq, "proxyreq"),                  (req.header_only, "header_only")):            val, name = x            log("    req.%s: %s" % (name, `val`))            if val:                self.fail("%s should be 0" % name)        log("    req.protocol: %s" % `req.protocol`)        if not req.protocol == req.the_request.split()[-1]:            self.fail("req.protocol doesn't match req.the_request")        log("    req.proto_num: %s" % `req.proto_num`)        if req.proto_num != 1000 + int(req.protocol[-1]):            self.fail("req.proto_num doesn't match req.protocol")        log("    req.hostname: %s" % `req.hostname`)        if req.hostname != "test_internal":            self.fail("req.hostname isn't 'test_internal'")        log("    req.request_time: %s" % `req.request_time`)        if (time.time() - req.request_time) > 10:            self.fail("req.request_time suggests request started more than 10 secs ago")        log("    req.status_line: %s" % `req.status_line`)        if req.status_line:            self.fail("req.status_line should be None at this point")        log("    req.status: %s" % `req.status`)        if req.status != 200:            self.fail("req.status should be 200")        req.status = req.status # make sure its writable        log("    req.method: %s" % `req.method`)        if req.method != "GET":            self.fail("req.method should be 'GET'")        log("    req.method_number: %s" % `req.method_number`)                if req.method_number != 0:            self.fail("req.method_number should be 0")        log("    req.allowed: %s" % `req.allowed`)        if req.allowed != 0:            self.fail("req.allowed should be 0")                    log("    req.allowed_xmethods: %s" % `req.allowed_xmethods`)        if req.allowed_xmethods != ():            self.fail("req.allowed_xmethods should be an empty tuple")                    log("    req.allowed_methods: %s" % `req.allowed_methods`)        if req.allowed_methods != ():            self.fail("req.allowed_methods should be an empty tuple")                    log("    req.sent_bodyct: %s" % `req.sent_bodyct`)        if req.sent_bodyct != 0:            self.fail("req.sent_bodyct should be 0")                    log("    req.bytes_sent: %s" % `req.bytes_sent`)        save = req.bytes_sent        log("       writing 4 bytes...")        req.write("1234")        log("       req.bytes_sent: %s" % `req.bytes_sent`)        if req.bytes_sent - save != 4:            self.fail("req.bytes_sent should have incremented by 4, but didn't")        log("    req.mtime: %s" % `req.mtime`)        if req.mtime != 0:            self.fail("req.mtime should be 0")                log("    req.chunked: %s" % `req.chunked`)        if req.chunked != 1:            self.fail("req.chunked should be 1")                    log("    req.range: %s" % `req.range`)        if req.range:            self.fail("req.range should be None")                    log("    req.clength: %s" % `req.clength`)        log("        calling req.set_content_length(15)...")        req.set_content_length(15)        log("        req.clength: %s" % `req.clength`)        if req.clength != 15:            self.fail("req.clength should be 15")                log("    req.remaining: %s" % `req.remaining`)        if req.remaining != 0:            self.fail("req.remaining should be 0")                    log("    req.read_length: %s" % `req.read_length`)        if req.read_length != 0:            self.fail("req.read_length should be 0")                log("    req.read_body: %s" % `req.read_body`)        if req.read_body != 0:            self.fail("req.read_body should be 0")                    log("    req.read_chunked: %s" % `req.read_chunked`)        if req.read_chunked != 0:            self.fail("req.read_chunked should be 0")                    log("    req.expecting_100: %s" % `req.expecting_100`)        if req.expecting_100 != 0:            self.fail("req.expecting_100 should be 0")        log("    req.headers_in: %s" % `req.headers_in`)         if req.headers_in["Host"][:13].lower() != "test_internal":            self.fail("The 'Host' header should begin with 'test_internal'")        log("    req.headers_out: %s" % `req.headers_out`)        if ((not req.headers_out.has_key("content-length")) or            req.headers_out["content-length"] != "15"):            self.fail("req.headers_out['content-length'] should be 15")                    log("    req.subprocess_env: %s" % `req.subprocess_env`)        if req.subprocess_env["SERVER_SOFTWARE"].find("Python") == -1:            self.fail("req.subprocess_env['SERVER_SOFTWARE'] should contain 'Python'")                    log("    req.notes: %s" % `req.notes`)        log("        doing req.notes['testing'] = '123' ...")        req.notes['testing'] = '123'        log("    req.notes: %s" % `req.notes`)        if req.notes["testing"] != '123':            self.fail("req.notes['testing'] should be '123'")                log("    req.phase: %s" % `req.phase`)        if req.phase != "PythonHandler":            self.fail("req.phase should be 'PythonHandler'")                    log("    req.interpreter: %s" % `req.interpreter`)        if req.interpreter != apache.interpreter:            self.fail("req.interpreter should be same as apache.interpreter" % `apache.interpreter`)        if req.interpreter != req.server.server_hostname:            self.fail("req.interpreter should be same as req.server.server_hostname: %s" % `req.server.server_hostname`)                    log("    req.content_type: %s" % `req.content_type`)        log("        doing req.content_type = 'test/123' ...")        req.content_type = 'test/123'        log("        req.content_type: %s" % `req.content_type`)        if req.content_type != 'test/123' or not req._content_type_set:            self.fail("req.content_type should be 'test/123' and req._content_type_set 1")                log("    req.handler: %s" % `req.handler`)        if req.handler != "mod_python":            self.fail("req.handler should be 'mod_python'")                    log("    req.content_encoding: %s" % `req.content_encoding`)        if req.content_encoding:            self.fail("req.content_encoding should be None")                     log("    req.content_languages: %s" % `req.content_languages`)        if req.content_languages != ():            self.fail("req.content_languages should be an empty tuple")                    log("    req.vlist_validator: %s" % `req.vlist_validator`)        if req.vlist_validator:            self.fail("req.vlist_validator should be None")                    log("    req.user: %s" % `req.user`)        if req.user:            self.fail("req.user should be None")                    log("    req.ap_auth_type: %s" % `req.ap_auth_type`)        if req.ap_auth_type:            self.fail("req.ap_auth_type should be None")                    log("    req.no_cache: %s" % `req.no_cache`)        if req.no_cache != 0:            self.fail("req.no_cache should be 0")                    log("    req.no_local_copy: %s" % `req.no_local_copy`)        if req.no_local_copy != 0:            self.fail("req.no_local_copy should be 0")                    log("    req.unparsed_uri: %s" % `req.unparsed_uri`)        if req.unparsed_uri != "/tests.py":            self.fail("req.unparsed_uri should be '/tests.py'")                    log("    req.uri: %s" % `req.uri`)        if req.uri != "/tests.py":            self.fail("req.uri should be '/tests.py'")                    log("    req.filename: %s" % `req.filename`)        if req.filename != req.document_root() + req.uri:            self.fail("req.filename should be req.document_root() + req.uri, but it isn't")                    log("    req.canonical_filename: %s" % `req.canonical_filename`)        if not req.canonical_filename:            self.fail("req.canonical_filename should not be blank")                log("    req.path_info: %s" % `req.path_info`)        if req.path_info != '':            self.fail("req.path_info should be ''")                log("    req.args: %s" % `req.args`)        if req.args:            self.fail("req.args should be None")                    log("    req.finfo: %s" % `req.finfo`)        if req.finfo[apache.FINFO_FNAME] and (req.finfo[apache.FINFO_FNAME] != req.canonical_filename):            self.fail("req.finfo[apache.FINFO_FNAME] should be the (canonical) filename")                log("    req.parsed_uri: %s" % `req.parsed_uri`)        if req.parsed_uri[apache.URI_PATH] != '/tests.py':            self.fail("req.parsed_uri[apache.URI_PATH] should be '/tests.py'")                    log("    req.used_path_info: %s" % `req.used_path_info`)        if req.used_path_info != 2:            self.fail("req.used_path_info should be 2") # XXX really? :-)                    log("    req.eos_sent: %s" % `req.eos_sent`)        if req.eos_sent:            self.fail("req.eos_sent says we sent EOS, but we didn't")    def test_req_get_config(self):        req = self.req        log = req.log_error        log("req.get_config(): %s" % `req.get_config()`)        if req.get_config()["PythonDebug"] != "1":            self.fail("get_config return should show PythonDebug 1")        log("req.get_options(): %s" % `req.get_options()`)        for option in apache.main_server.get_options().keys():            del req.get_options()[option]        if req.get_options() != apache.table({"testing":"123"}):

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
9191成人精品久久| 欧美一区二区三区免费在线看| 色综合久久久久综合体桃花网| 在线综合亚洲欧美在线视频| 国产欧美日韩精品在线| 五月综合激情日本mⅴ| 国产v综合v亚洲欧| 日韩欧美的一区| 亚洲一区二区在线观看视频| 成人黄色片在线观看| 日韩精品一区二区三区视频| 亚洲一区二区三区三| 成人福利视频网站| 精品国产免费久久| 偷拍日韩校园综合在线| 色综合久久88色综合天天6 | 欧美电影免费观看高清完整版在| 亚洲欧美日韩国产一区二区三区| 国产精品亚洲午夜一区二区三区| 9191久久久久久久久久久| 亚洲精品网站在线观看| 国产成人在线网站| 亚洲精品在线一区二区| 麻豆免费精品视频| 欧美精品久久久久久久久老牛影院| 亚洲乱码国产乱码精品精98午夜 | 一区二区三区国产豹纹内裤在线| 成人av电影在线| 国产天堂亚洲国产碰碰| 国产一区欧美一区| 国产午夜亚洲精品不卡| 狠狠色丁香久久婷婷综合_中| 欧美成人精品二区三区99精品| 日日嗨av一区二区三区四区| 欧美精品欧美精品系列| 亚洲444eee在线观看| 欧美日韩国产综合一区二区| 天堂va蜜桃一区二区三区漫画版| 欧美天堂一区二区三区| 亚洲成人免费视| 538在线一区二区精品国产| 亚洲成人av免费| 日韩三级精品电影久久久 | 日韩欧美国产1| 国产一区二区三区在线看麻豆| 欧美精品一区二区三区久久久| 国产在线观看一区二区| 中文在线一区二区| 一本到不卡精品视频在线观看| 亚洲成人av一区二区三区| 欧美一区二区视频网站| 国产一区二区三区精品视频| 欧美精彩视频一区二区三区| 国产盗摄女厕一区二区三区| 亚洲欧美中日韩| 欧美日韩免费不卡视频一区二区三区| 免费精品视频在线| 国产精品久久久久久久久免费桃花 | 国产精品麻豆一区二区| 91丨国产丨九色丨pron| 亚洲国产裸拍裸体视频在线观看乱了| 91精品国产黑色紧身裤美女| 国产高清不卡一区| 亚洲综合色区另类av| 欧美电影免费观看完整版| 韩国成人福利片在线播放| 久久久久久久免费视频了| 91麻豆国产福利精品| 日本不卡的三区四区五区| 欧美激情一区二区三区不卡| 欧美日韩一区中文字幕| 精品一区二区免费| 亚洲日本在线观看| 精品99一区二区三区| 日本国产一区二区| 国产一区二区伦理| 亚洲影院理伦片| 欧美激情一区二区三区蜜桃视频| 欧美日韩视频第一区| 国产成人亚洲精品狼色在线| 午夜成人免费视频| 亚洲人成网站精品片在线观看| 欧美成人一区二区三区片免费| 一本色道a无线码一区v| 国产精品夜夜爽| 久久精品国产第一区二区三区| 亚洲女同女同女同女同女同69| 久久久久久毛片| 91精品国产综合久久精品麻豆| 91网上在线视频| 国产成人啪午夜精品网站男同| 免费成人小视频| 亚洲一区二区三区视频在线 | 三级成人在线视频| 亚洲区小说区图片区qvod| 久久久久久久久久看片| 在线不卡a资源高清| 在线一区二区观看| av电影一区二区| 福利一区福利二区| 国产在线麻豆精品观看| 肉色丝袜一区二区| 五月天欧美精品| 一区二区三区美女视频| 中文字幕一区二区在线播放| 久久九九久久九九| 久久久久国产精品人| 日韩一区二区三| 日韩欧美一二三| 日韩一区二区视频| 欧美二区乱c少妇| 欧美日韩国产不卡| 欧美日韩国产首页| 欧美狂野另类xxxxoooo| 欧美日韩国产免费一区二区 | 国产欧美一区二区在线观看| 亚洲精品一区二区在线观看| 日韩三级在线免费观看| 精品欧美一区二区在线观看| 欧美一区二区播放| 精品久久99ma| 久久久777精品电影网影网| 国产欧美日韩在线| 中文字幕制服丝袜成人av| 国产精品福利在线播放| 亚洲女同ⅹxx女同tv| 亚洲国产精品久久艾草纯爱 | 亚洲福利电影网| 日本一区中文字幕 | 免费在线成人网| 国产在线精品视频| 不卡一区二区三区四区| 91麻豆高清视频| 这里只有精品视频在线观看| 日韩免费高清视频| 欧美激情一区二区三区不卡| 亚洲女与黑人做爰| 日韩国产高清在线| 国产99一区视频免费| 色综合中文字幕国产 | 99久久精品国产导航| 91福利资源站| 91精品国产麻豆国产自产在线| 精品99999| 一区二区三区在线视频播放| 丝瓜av网站精品一区二区| 精品一区二区三区免费| 99久久99久久精品免费看蜜桃| 欧美午夜精品一区| 精品久久久久久久久久久久久久久久久 | 国产精品不卡在线观看| 一区二区不卡在线视频 午夜欧美不卡在| 一区二区三区不卡视频| 久久99久久久久| 色综合色综合色综合色综合色综合| 9191久久久久久久久久久| 国产精品三级在线观看| 亚洲国产精品麻豆| 大白屁股一区二区视频| 欧美日韩一区二区三区四区五区 | 亚洲一区二区在线免费看| 狠狠狠色丁香婷婷综合激情 | 久久综合av免费| 亚洲一区二三区| 成人毛片在线观看| 日韩情涩欧美日韩视频| 亚洲男同性视频| 国产剧情一区二区| 欧美精品丝袜久久久中文字幕| 国产欧美精品一区aⅴ影院| 日韩国产在线观看一区| 99re这里只有精品视频首页| 精品欧美一区二区久久| 婷婷中文字幕一区三区| 99久久综合99久久综合网站| 日韩久久精品一区| 亚洲va天堂va国产va久| 99re8在线精品视频免费播放| 欧美电影精品一区二区| 亚洲va欧美va国产va天堂影院| 9i在线看片成人免费| 国产日产欧美精品一区二区三区| 日韩一区精品视频| 欧美性猛交xxxxxx富婆| 亚洲男人都懂的| 99精品在线免费| 中文字幕亚洲综合久久菠萝蜜| 国产一区二区剧情av在线| 欧美一区二区三级| 亚洲成a人片在线不卡一二三区| 99久久99久久久精品齐齐| 欧美国产成人精品| 国产麻豆精品在线观看| 精品毛片乱码1区2区3区| 七七婷婷婷婷精品国产| 欧美一级一级性生活免费录像| 午夜私人影院久久久久| 欧美系列日韩一区| 亚洲高清在线精品| 欧美日韩一级二级|