mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-23 17:17:36 +00:00
Move LoggingServiceParent back to common
This commit is contained in:
@ -46,6 +46,7 @@ from testtools.twistedsupport import (
|
|||||||
flush_logged_errors,
|
flush_logged_errors,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from twisted.application import service
|
||||||
from twisted.plugin import IPlugin
|
from twisted.plugin import IPlugin
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
from twisted.internet.defer import inlineCallbacks, returnValue
|
from twisted.internet.defer import inlineCallbacks, returnValue
|
||||||
@ -88,7 +89,7 @@ from .eliotutil import (
|
|||||||
EliotLoggedRunTest,
|
EliotLoggedRunTest,
|
||||||
)
|
)
|
||||||
# Backwards compatibility imports:
|
# Backwards compatibility imports:
|
||||||
from .common_py3 import LoggingServiceParent, ShouldFailMixin # noqa: F401
|
from .common_py3 import ShouldFailMixin # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
TEST_RSA_KEY_SIZE = 522
|
TEST_RSA_KEY_SIZE = 522
|
||||||
@ -781,6 +782,11 @@ def create_mutable_filenode(contents, mdmf=False, all_contents=None):
|
|||||||
return filenode
|
return filenode
|
||||||
|
|
||||||
|
|
||||||
|
class LoggingServiceParent(service.MultiService):
|
||||||
|
def log(self, *args, **kwargs):
|
||||||
|
return log.msg(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
TEST_DATA=b"\x02"*(Uploader.URI_LIT_SIZE_THRESHOLD+1)
|
TEST_DATA=b"\x02"*(Uploader.URI_LIT_SIZE_THRESHOLD+1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,13 +19,11 @@ import time
|
|||||||
import signal
|
import signal
|
||||||
|
|
||||||
from twisted.internet import defer, reactor
|
from twisted.internet import defer, reactor
|
||||||
from twisted.application import service
|
|
||||||
from twisted.python import failure
|
from twisted.python import failure
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
from ..util.assertutil import precondition
|
from ..util.assertutil import precondition
|
||||||
from ..util.encodingutil import unicode_platform, get_filesystem_encoding
|
from ..util.encodingutil import unicode_platform, get_filesystem_encoding
|
||||||
from ..util import log
|
|
||||||
|
|
||||||
|
|
||||||
class TimezoneMixin(object):
|
class TimezoneMixin(object):
|
||||||
@ -163,8 +161,3 @@ class FakeCanary(object):
|
|||||||
return None
|
return None
|
||||||
def getPeer(self):
|
def getPeer(self):
|
||||||
return "<fake>"
|
return "<fake>"
|
||||||
|
|
||||||
|
|
||||||
class LoggingServiceParent(service.MultiService):
|
|
||||||
def log(self, *args, **kwargs):
|
|
||||||
return log.msg(*args, **kwargs)
|
|
||||||
|
@ -51,7 +51,8 @@ from allmydata.test.no_network import NoNetworkServer
|
|||||||
from allmydata.storage_client import (
|
from allmydata.storage_client import (
|
||||||
_StorageServer,
|
_StorageServer,
|
||||||
)
|
)
|
||||||
from .common_py3 import FakeCanary, LoggingServiceParent, ShouldFailMixin
|
from .common import LoggingServiceParent
|
||||||
|
from .common_py3 import FakeCanary, ShouldFailMixin
|
||||||
|
|
||||||
|
|
||||||
class UtilTests(unittest.TestCase):
|
class UtilTests(unittest.TestCase):
|
||||||
|
Reference in New Issue
Block a user