From 283be23e3ae3c9fb3249fe49b0ee9efa2d941df0 Mon Sep 17 00:00:00 2001 From: meejah Date: Fri, 2 Feb 2018 00:10:45 -0700 Subject: [PATCH] basedir fixup, more tests --- src/allmydata/test/test_client.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py index 3c8d76662..b3632d7aa 100644 --- a/src/allmydata/test/test_client.py +++ b/src/allmydata/test/test_client.py @@ -10,6 +10,7 @@ import allmydata.frontends.magic_folder import allmydata.util.log from allmydata.node import OldConfigError, OldConfigOptionError, UnescapedHashError, _Config, read_config, create_node_dir +from allmydata.node import config_from_string from allmydata.frontends.auth import NeedRootcapLookupScheme from allmydata import client from allmydata.storage_client import StorageFarmBroker @@ -571,6 +572,24 @@ def flush_but_dont_ignore(res): d.addCallback(_done) return d + +class IntroducerClients(unittest.TestCase): + + def test_invalid_introducer_furl(self): + cfg = ( + "[client]\n" + "introducer.furl = None\n" + ) + config = config_from_string(cfg, "client.port", "basedir") + + with self.assertRaises(ValueError) as ctx: + client.create_introducer_clients(config, main_tub=None) + self.assertIn( + "invalid 'introducer.furl = None'", + str(ctx.exception) + ) + + class Run(unittest.TestCase, testutil.StallMixin): def setUp(self):