Changeset 83773364 in trunk


Ignore:
Timestamp:
2009-06-24T19:40:38Z (16 years ago)
Author:
Brian Warner <warner@…>
Branches:
master
Children:
bd6ecc9f
Parents:
96cda87
Message:

remove introducer/old.py, will create something similar when the RIIntroducer changes

Location:
src/allmydata
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/test/test_introducer.py

    r96cda87 r83773364  
     1
     2import os, re
    13from base64 import b32decode
    2 
    3 import os
    44
    55from twisted.trial import unittest
     
    1414# test compatibility with old introducer .tac files
    1515from allmydata.introducer import IntroducerNode
    16 from allmydata.introducer import old
    1716from allmydata.util import pollmixin
    1817import common_util as testutil
     
    207206            log.msg("restarting introducer's Tub")
    208207
    209             # note: old.Server doesn't have this count
    210208            dc = introducer._debug_counts
    211209            self.expected_count = dc["inbound_message"] + NUM_SERVERS
     
    380378        return d
    381379
    382 class Index(unittest.TestCase):
    383     def test_make_index(self):
     380class DecodeFurl(unittest.TestCase):
     381    def test_decode(self):
    384382        # make sure we have a working base64.b32decode. The one in
    385383        # 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())
    390388        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.