1 | #!/usr/bin/python |
---|
2 | |
---|
3 | import unittest |
---|
4 | |
---|
5 | from allmydata.util.fileutil import write |
---|
6 | from allmydata.client import Client, MULTI_INTRODUCERS_CFG |
---|
7 | |
---|
8 | INTRODUCER_FURLS=['furl1', 'furl2'] |
---|
9 | |
---|
10 | class 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 | |
---|
18 | if __name__ == "__main__": |
---|
19 | unittest.main() |
---|