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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 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"}):

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产农村妇女精品| 五月综合激情日本mⅴ| 欧美视频一区二区三区在线观看| 激情综合一区二区三区| 亚洲精选在线视频| 久久精品一区四区| 678五月天丁香亚洲综合网| 99精品视频在线观看免费| 蜜桃视频一区二区| 一区二区三区在线视频免费观看| 欧美成人猛片aaaaaaa| 精品视频1区2区| 成人av在线影院| 极品少妇一区二区| 免费国产亚洲视频| 亚洲图片欧美视频| 亚洲精品一卡二卡| 中文字幕一区在线观看视频| 久久久久久久久岛国免费| 91精品国产综合久久久久久久| 一本色道久久综合亚洲精品按摩| 成人精品一区二区三区四区| 精品一区二区综合| 久久精品国产精品亚洲精品 | 欧美v日韩v国产v| 欧美色国产精品| 色婷婷av一区二区三区之一色屋| 成人av在线影院| 成人爽a毛片一区二区免费| 狠狠久久亚洲欧美| 精品在线观看免费| 国产在线日韩欧美| 国产一区二区成人久久免费影院| 美女视频第一区二区三区免费观看网站| 亚洲成人av一区二区| 一区二区三区日韩精品视频| 亚洲精品老司机| 一区二区三区四区激情| 亚洲精品中文字幕在线观看| 一区二区三区在线视频免费观看 | 一区二区在线观看视频在线观看| 国产精品久久看| 亚洲欧洲日产国码二区| 亚洲人成网站精品片在线观看| 国产精品国产三级国产普通话三级 | 国产精品亚洲专一区二区三区| 久久超碰97人人做人人爱| 韩国女主播成人在线观看| 国产麻豆精品视频| 国产精品12区| a在线播放不卡| 91色.com| 欧美日韩免费视频| 欧美一级片免费看| 久久精品视频免费观看| 国产精品白丝在线| 亚洲国产精品久久一线不卡| 天堂成人免费av电影一区| 日本va欧美va欧美va精品| 精品一区二区三区不卡| 成人网男人的天堂| 欧美午夜电影一区| 欧美tickling网站挠脚心| 中文字幕国产一区| 亚洲综合免费观看高清在线观看| 日本不卡在线视频| 国产成人福利片| 欧美亚洲禁片免费| 精品国产三级电影在线观看| 国产日产欧美一区二区三区 | 亚洲欧洲av一区二区三区久久| 亚洲黄色av一区| 美女一区二区三区在线观看| 成人免费高清视频在线观看| 欧美网站一区二区| 精品国产青草久久久久福利| 中文字幕中文乱码欧美一区二区| 性久久久久久久久久久久| 国产一区激情在线| 欧美在线观看一二区| 国产亚洲污的网站| 亚洲一区二区三区视频在线播放 | 2024国产精品| 亚洲最新在线观看| 国产精品一区2区| 欧美三级视频在线观看| 日本一区二区三区在线观看| 亚洲午夜在线观看视频在线| 国产露脸91国语对白| 欧美日韩综合一区| 国产精品视频你懂的| 蜜臀99久久精品久久久久久软件| 91丨porny丨中文| 久久奇米777| 日韩国产成人精品| 色猫猫国产区一区二在线视频| 精品日韩在线观看| 亚洲国产精品自拍| 99re8在线精品视频免费播放| 日韩欧美亚洲另类制服综合在线| 亚洲日本护士毛茸茸| 国产精品自拍毛片| 91精品福利在线一区二区三区| 亚洲色图欧美在线| 国产成人综合在线观看| 欧美一区二区三区免费视频| 亚洲欧美激情插| 顶级嫩模精品视频在线看| 日韩欧美另类在线| 天堂在线一区二区| 欧美影院精品一区| 亚洲免费观看高清| 99久久久精品免费观看国产蜜| 2021中文字幕一区亚洲| 日韩精品亚洲一区| 欧美日本一道本| 亚洲一本大道在线| 欧美色图天堂网| 亚洲猫色日本管| 91美女在线看| 亚洲视频图片小说| 99精品黄色片免费大全| 久久久久久亚洲综合影院红桃| 免费日韩伦理电影| 日韩欧美一区二区在线视频| 日精品一区二区三区| 欧美日韩激情在线| 五月天久久比比资源色| 6080国产精品一区二区| 婷婷夜色潮精品综合在线| 欧美日韩在线三区| 亚洲香蕉伊在人在线观| 欧美日韩免费电影| 日韩高清一区二区| 日韩欧美中文字幕制服| 免费人成在线不卡| 欧美大黄免费观看| 狠狠色狠狠色综合日日91app| 精品人在线二区三区| 国产一区二区精品久久| 中文字幕高清一区| 成人99免费视频| 一区二区三区丝袜| 欧美男女性生活在线直播观看| 手机精品视频在线观看| 欧美一区二区在线播放| 男人的天堂久久精品| 精品久久久久久久久久久久久久久| 精品一二三四区| 国产精品欧美久久久久无广告 | 日韩精品成人一区二区三区| 欧美一区三区四区| 激情综合亚洲精品| 中文字幕中文字幕一区二区| 欧美在线一区二区| 免费成人在线影院| 国产亚洲精品bt天堂精选| 成人免费高清视频在线观看| 亚洲欧美一区二区久久| 欧美日韩高清一区| 国产精品资源站在线| 亚洲欧洲国产日本综合| 欧美日韩黄色影视| 国产精品性做久久久久久| 国产精品国产三级国产普通话蜜臀 | 国产69精品久久777的优势| 日韩一区在线免费观看| 欧美久久久久中文字幕| 狠狠色丁香久久婷婷综合_中| 中文在线资源观看网站视频免费不卡| 91国内精品野花午夜精品| 奇米精品一区二区三区在线观看一 | 黄色精品一二区| 自拍偷自拍亚洲精品播放| 欧美日韩在线播| 国产精一区二区三区| 亚洲韩国一区二区三区| 国产日韩欧美精品综合| 欧美日韩一区二区三区四区| 国产精品99久久久久久有的能看 | 亚洲在线视频一区| 久久久亚洲欧洲日产国码αv| 91老师国产黑色丝袜在线| 青青国产91久久久久久| 国产精品久久综合| 日韩欧美视频在线| 色久综合一二码| 国产乱码精品一区二区三区五月婷 | 在线观看欧美黄色| 国产毛片精品国产一区二区三区| 亚洲综合视频在线观看| 久久精品夜色噜噜亚洲a∨| 欧美日韩夫妻久久| jizz一区二区| 国产一区二区三区在线观看精品| 亚洲一区二区视频在线观看| 中文字幕精品一区二区三区精品| 欧美一级理论性理论a| 色av成人天堂桃色av| 成人午夜激情片|