Ticket #68: test_multi_introducers.3.py

File test_multi_introducers.3.py, 544 bytes (added by writefaruq, at 2010-07-31T17:10:07Z)

code refined by pyflakes

Line 
1#!/usr/bin/python
2
3import unittest
4
5from allmydata.util.fileutil import write
6from allmydata.client import Client, MULTI_INTRODUCERS_CFG
7
8INTRODUCER_FURLS=['furl1', 'furl2']
9
10class TestClient(unittest.TestCase):
11    def test_introducer_count(self):
12        write(MULTI_INTRODUCERS_CFG, '\n'.join(INTRODUCER_FURLS))
13        # get a client and count of introducer_clients
14        myclient = Client()
15        ic_count = len(myclient.introducer_clients)
16        self.failUnlessEqual(ic_count, 2)
17   
18if __name__ == "__main__":
19    unittest.main()