mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-23 12:59:55 +00:00
replaced testools.unittest.TestCase with common base case
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
This commit is contained in:
parent
bec813fee5
commit
55221d4532
@ -10,14 +10,15 @@ from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
|
||||
from twisted.trial import unittest
|
||||
from ..common import AsyncTestCase
|
||||
from foolscap.api import flushEventualQueue
|
||||
from allmydata.monitor import Monitor
|
||||
from allmydata.mutable.common import CorruptShareError
|
||||
from .util import PublishMixin, corrupt, CheckerMixin
|
||||
|
||||
class Checker(unittest.TestCase, CheckerMixin, PublishMixin):
|
||||
class Checker(AsyncTestCase, CheckerMixin, PublishMixin):
|
||||
def setUp(self):
|
||||
super(Checker, self).setUp()
|
||||
return self.publish_one()
|
||||
|
||||
|
||||
|
@ -10,11 +10,13 @@ from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
|
||||
from twisted.trial import unittest
|
||||
from ..common import SyncTestCase
|
||||
from allmydata.mutable.publish import MutableData
|
||||
|
||||
class DataHandle(unittest.TestCase):
|
||||
|
||||
class DataHandle(SyncTestCase):
|
||||
def setUp(self):
|
||||
super(DataHandle, self).setUp()
|
||||
self.test_data = b"Test Data" * 50000
|
||||
self.uploadable = MutableData(self.test_data)
|
||||
|
||||
|
@ -10,11 +10,12 @@ from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
|
||||
from twisted.trial import unittest
|
||||
from ..common import AsyncTestCase
|
||||
from .util import FakeStorage, make_nodemaker
|
||||
|
||||
class DifferentEncoding(unittest.TestCase):
|
||||
class DifferentEncoding(AsyncTestCase):
|
||||
def setUp(self):
|
||||
super(DifferentEncoding, self).setUp()
|
||||
self._storage = s = FakeStorage()
|
||||
self.nodemaker = make_nodemaker(s)
|
||||
|
||||
|
@ -11,10 +11,11 @@ from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
|
||||
from twisted.trial import unittest
|
||||
from ..common import SyncTestCase
|
||||
from allmydata.mutable.common import NeedMoreDataError, UncoordinatedWriteError
|
||||
|
||||
class Exceptions(unittest.TestCase):
|
||||
|
||||
class Exceptions(SyncTestCase):
|
||||
def test_repr(self):
|
||||
nmde = NeedMoreDataError(100, 50, 100)
|
||||
self.failUnless("NeedMoreDataError" in repr(nmde), repr(nmde))
|
||||
|
@ -12,11 +12,13 @@ if PY2:
|
||||
|
||||
import os
|
||||
from io import BytesIO
|
||||
from twisted.trial import unittest
|
||||
from ..common import SyncTestCase
|
||||
from allmydata.mutable.publish import MutableFileHandle
|
||||
|
||||
class FileHandle(unittest.TestCase):
|
||||
|
||||
class FileHandle(SyncTestCase):
|
||||
def setUp(self):
|
||||
super(FileHandle, self).setUp()
|
||||
self.test_data = b"Test Data" * 50000
|
||||
self.sio = BytesIO(self.test_data)
|
||||
self.uploadable = MutableFileHandle(self.sio)
|
||||
|
Loading…
Reference in New Issue
Block a user