forked from LBRYCommunity/lbry-sdk
fixing unit tests
This commit is contained in:
parent
855fd8bf9a
commit
af2aeaa66b
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
import StringIO
|
from io import StringIO
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
@ -7,7 +7,7 @@ from twisted.internet import defer
|
||||||
from twisted import trial
|
from twisted import trial
|
||||||
|
|
||||||
from lbrynet import custom_logger
|
from lbrynet import custom_logger
|
||||||
from lbrynet.tests.util import is_android
|
from tests.util import is_android
|
||||||
|
|
||||||
|
|
||||||
class TestLogger(trial.unittest.TestCase):
|
class TestLogger(trial.unittest.TestCase):
|
||||||
|
@ -23,7 +23,7 @@ class TestLogger(trial.unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.log = custom_logger.Logger('test')
|
self.log = custom_logger.Logger('test')
|
||||||
self.stream = StringIO.StringIO()
|
self.stream = StringIO()
|
||||||
handler = logging.StreamHandler(self.stream)
|
handler = logging.StreamHandler(self.stream)
|
||||||
handler.setFormatter(logging.Formatter("%(filename)s:%(lineno)d - %(message)s"))
|
handler.setFormatter(logging.Formatter("%(filename)s:%(lineno)d - %(message)s"))
|
||||||
self.log.addHandler(handler)
|
self.log.addHandler(handler)
|
||||||
|
|
Loading…
Add table
Reference in a new issue