def setUp(self):  # NOQA
     setup_logger('warning', fname('log_file'))
     self.website = Site(TopLevelResource())
     self.listen_port = 51242
     self.website.resource.redirect_rsrc.get_url = self.get_url
     for dummy in range(10):
         try:
             self.webserver = reactor.listenTCP(self.listen_port, self.website)
         except CannotListenError as ex:
             error = ex
             self.listen_port += 1
         else:
             break
     else:
         raise error
 def setUp(self):  # NOQA
     setup_logger('warning', fname('log_file'))
     self.website = Site(TopLevelResource())
     self.listen_port = 51242
     self.website.resource.redirect_rsrc.get_url = self.get_url
     for dummy in range(10):
         try:
             self.webserver = reactor.listenTCP(self.listen_port,
                                                self.website)
         except CannotListenError as ex:
             error = ex
             self.listen_port += 1
         else:
             break
     else:
         raise error
Beispiel #3
0
 def tear_down(self):
     setup_logger('none')
Beispiel #4
0
 def set_up(self):
     setup_logger(logging.DEBUG)
Beispiel #5
0
# See LICENSE for more details.
#

from __future__ import unicode_literals

import deluge.component as component
import deluge.error
from deluge.common import get_localhost_auth
from deluge.core import rpcserver
from deluge.core.authmanager import AuthManager
from deluge.core.rpcserver import DelugeRPCProtocol, RPCServer
from deluge.log import setup_logger

from .basetest import BaseTestCase

setup_logger('none')


class DelugeRPCProtocolTester(DelugeRPCProtocol):

    messages = []

    def transfer_message(self, data):
        self.messages.append(data)


class RPCServerTestCase(BaseTestCase):
    def set_up(self):
        self.rpcserver = RPCServer(listen=False)
        self.rpcserver.factory.protocol = DelugeRPCProtocolTester
        self.factory = self.rpcserver.factory
# See LICENSE for more details.
#

from __future__ import unicode_literals

import deluge.component as component
import deluge.error
from deluge.common import get_localhost_auth
from deluge.core import rpcserver
from deluge.core.authmanager import AuthManager
from deluge.core.rpcserver import DelugeRPCProtocol, RPCServer
from deluge.log import setup_logger

from .basetest import BaseTestCase

setup_logger('none')


class DelugeRPCProtocolTester(DelugeRPCProtocol):

    messages = []

    def transfer_message(self, data):
        self.messages.append(data)


class RPCServerTestCase(BaseTestCase):

    def set_up(self):
        self.rpcserver = RPCServer(listen=False)
        self.rpcserver.factory.protocol = DelugeRPCProtocolTester
Beispiel #7
0
 def tear_down(self):
     setup_logger('none')
Beispiel #8
0
 def set_up(self):
     setup_logger(logging.DEBUG)