コード例 #1
0
def setUpModule():
    configure_test_logging()
    HTTPInfo.port = networking.unused_tcp_port()
    HTTPInfo.server = HTTPServer((HTTPInfo.address, HTTPInfo.port),
                                 GetTestHandler)
    HTTPInfo.make_url()
    HTTPInfo.thread = threading.Thread(target=HTTPInfo.server.serve_forever)
    HTTPInfo.thread.start()

    global randomdata
    randomdata = os.urandom(MB)
コード例 #2
0
def setUpModule():
    # Add thread names and timing information to test logs. Also, since the tests intentionally involve numerous
    # exceptions logged at WARNING level, we increase the log level to ERROR. Set DSS_DEBUG to 1 for verbose logs.
    configure_test_logging(
        format="%(asctime)s %(levelname)s %(name)s %(threadName)s: %(message)s",
        log_levels={dss.notify.__name__: (logging.ERROR, logging.DEBUG)})
コード例 #3
0
def setUpModule():
    configure_test_logging()