#!/usr/bin/python

import unittest

from allmydata.util.fileutil import write
from allmydata.client import Client, MULTI_INTRODUCERS_CFG

INTRODUCER_FURLS=['furl1', 'furl2']

class TestClient(unittest.TestCase):
    def test_introducer_count(self):
        write(MULTI_INTRODUCERS_CFG, '\n'.join(INTRODUCER_FURLS))
        # get a client and count of introducer_clients
        myclient = Client()
        ic_count = len(myclient.introducer_clients)
        self.failUnlessEqual(ic_count, 2)
    
if __name__ == "__main__":
    unittest.main()
