Changeset bbd3b200 in trunk
- Timestamp:
- 2019-03-07T23:38:52Z (6 years ago)
- Branches:
- master
- Children:
- 154f9dc8
- Parents:
- 565616d
- git-author:
- Jean-Paul Calderone <exarkun@…> (2019-03-07 20:04:53)
- git-committer:
- Jean-Paul Calderone <exarkun@…> (2019-03-07 23:38:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/test/test_introducer.py ¶
r565616d rbbd3b200 5 5 from socket import socket, AF_INET 6 6 from mock import Mock, patch 7 8 from testtools.matchers import ( 9 Is, 10 ) 7 11 8 12 from twisted.trial import unittest … … 35 39 from allmydata.util import pollmixin, keyutil, idlib, fileutil, iputil, yamlutil 36 40 import allmydata.test.common_util as testutil 41 from .common import ( 42 AsyncTestCase, 43 SyncTestCase, 44 ) 37 45 38 46 fcntl = requireModule("fcntl") … … 42 50 log.msg(msg, **kw) 43 51 44 class Node(testutil.SignalMixin, testutil.ReallyEqualMixin, unittest.TestCase):52 class Node(testutil.SignalMixin, testutil.ReallyEqualMixin, AsyncTestCase): 45 53 46 54 def test_backwards_compat_import(self): … … 144 152 return d 145 153 146 class Introducer(ServiceMixin, unittest.TestCase, pollmixin.PollMixin):154 class Introducer(ServiceMixin, AsyncTestCase, pollmixin.PollMixin): 147 155 def test_create(self): 148 156 ic = IntroducerClient(None, "introducer.furl", u"my_nickname", … … 176 184 return ann_t 177 185 178 class Client( unittest.TestCase):186 class Client(AsyncTestCase): 179 187 def test_duplicate_receive_v2(self): 180 188 ic1 = IntroducerClient(None, … … 285 293 return d 286 294 287 class Server( unittest.TestCase):295 class Server(AsyncTestCase): 288 296 def test_duplicate(self): 289 297 i = IntroducerService() … … 435 443 self.central_portnum = listenOnUnused(tub, portnum) 436 444 437 class Queue(SystemTestMixin, unittest.TestCase):445 class Queue(SystemTestMixin, AsyncTestCase): 438 446 def test_queue_until_connected(self): 439 447 self.basedir = "introducer/QueueUntilConnected/queued" … … 485 493 486 494 487 class SystemTest(SystemTestMixin, unittest.TestCase):495 class SystemTest(SystemTestMixin, AsyncTestCase): 488 496 489 497 def do_system_test(self): … … 780 788 3456) 781 789 782 class ClientInfo( unittest.TestCase):790 class ClientInfo(AsyncTestCase): 783 791 def test_client_v2(self): 784 792 introducer = IntroducerService() … … 802 810 self.failUnlessEqual(s0.version, "my_version") 803 811 804 class Announcements( unittest.TestCase):812 class Announcements(AsyncTestCase): 805 813 def test_client_v2_signed(self): 806 814 introducer = IntroducerService() … … 819 827 a = introducer.get_announcements() 820 828 self.failUnlessEqual(len(a), 1) 821 self. failUnlessIdentical(a[0].canary, canary0)829 self.assertThat(a[0].canary, Is(canary0)) 822 830 self.failUnlessEqual(a[0].index, ("storage", pks)) 823 831 self.failUnlessEqual(a[0].announcement["app-versions"], app_versions) … … 923 931 frozenset([pub1, pub2])) 924 932 925 class ClientSeqnums( unittest.TestCase):933 class ClientSeqnums(AsyncTestCase): 926 934 927 935 @defer.inlineCallbacks … … 984 992 } 985 993 986 class NonV1Server(SystemTestMixin, unittest.TestCase):994 class NonV1Server(SystemTestMixin, AsyncTestCase): 987 995 # if the client connects to a server that doesn't provide the 'v2' 988 996 # protocol, it is supposed to provide a useful error instead of a weird … … 1023 1031 return d 1024 1032 1025 class DecodeFurl( unittest.TestCase):1033 class DecodeFurl(SyncTestCase): 1026 1034 def test_decode(self): 1027 1035 # make sure we have a working base64.b32decode. The one in … … 1033 1041 self.failUnlessEqual(nodeid, "\x9fM\xf2\x19\xcckU0\xbf\x03\r\x10\x99\xfb&\x9b-\xc7A\x1d") 1034 1042 1035 class Signatures( unittest.TestCase):1043 class Signatures(SyncTestCase): 1036 1044 def test_sign(self): 1037 1045 ann = {"key1": "value1"}
Note: See TracChangeset
for help on using the changeset viewer.