Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(12)  |  Derive(0)  |  Import(2)

src/m/e/meniscus-portal-0.2.1.7/portal/server.py   meniscus-portal(Download)
from tornado.tcpserver import TCPServer
 
from portal.input.syslog import Parser, SyslogMessageHandler
 
 
    def handle_stream(self, stream, address):
        TornadoConnection(Parser(self.msg_delegate), stream, address)
 
 
def start_io():

src/m/e/meniscus-portal-0.2.1.7/portal/tests/input/syslog/syslog_test.py   meniscus-portal(Download)
import unittest
import time
 
from portal.input.syslog import (
    SyslogMessageHandler, Parser, ParsingError
    def test_bad_octet_count(self):
        validator = MessageValidator(self)
        parser = Parser(validator)
 
        with self.assertRaises(ParsingError):
            parser.read(BAD_OCTET_COUNT)
 
    def test_too_long_octet_count(self):
        validator = MessageValidator(self)
        parser = Parser(validator)
    def test_short_octet_count(self):
        validator = MessageValidator(self)
        parser = Parser(validator)
 
        with self.assertRaises(ParsingError):
            parser.read(SHORT_OCTET_COUNT)
 
    def test_read_message_with_no_octet_count(self):
        validator = NoOctetCountValidator(self)
        parser = Parser(validator)