Changeset 83773364 in trunk
- Timestamp:
- 2009-06-24T19:40:38Z (16 years ago)
- Branches:
- master
- Children:
- bd6ecc9f
- Parents:
- 96cda87
- Location:
- src/allmydata
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/test/test_introducer.py ¶
r96cda87 r83773364 1 2 import os, re 1 3 from base64 import b32decode 2 3 import os4 4 5 5 from twisted.trial import unittest … … 14 14 # test compatibility with old introducer .tac files 15 15 from allmydata.introducer import IntroducerNode 16 from allmydata.introducer import old17 16 from allmydata.util import pollmixin 18 17 import common_util as testutil … … 207 206 log.msg("restarting introducer's Tub") 208 207 209 # note: old.Server doesn't have this count210 208 dc = introducer._debug_counts 211 209 self.expected_count = dc["inbound_message"] + NUM_SERVERS … … 380 378 return d 381 379 382 class Index(unittest.TestCase):383 def test_ make_index(self):380 class DecodeFurl(unittest.TestCase): 381 def test_decode(self): 384 382 # make sure we have a working base64.b32decode. The one in 385 383 # python2.4.[01] was broken. 386 ann = ('pb://t5g7egomnnktbpydbuijt6zgtmw4oqi5@127.0.0.1:51857/hfzv36i',387 'storage', 'RIStorageServer.tahoe.allmydata.com',388 'plancha', 'allmydata-tahoe/1.4.1', '1.0.0')389 (nodeid, service_name) = old.make_index(ann)384 furl = 'pb://t5g7egomnnktbpydbuijt6zgtmw4oqi5@127.0.0.1:51857/hfzv36i' 385 m = re.match(r'pb://(\w+)@', furl) 386 assert m 387 nodeid = b32decode(m.group(1).upper()) 390 388 self.failUnlessEqual(nodeid, "\x9fM\xf2\x19\xcckU0\xbf\x03\r\x10\x99\xfb&\x9b-\xc7A\x1d") 391 self.failUnlessEqual(service_name, "storage") 392 389
Note: See TracChangeset
for help on using the changeset viewer.