From 777d722b0d4d1baa891621fe86af743bbec3909b Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Mon, 26 Jun 2017 15:41:47 -0400 Subject: [PATCH] Let me use FakeConfig in another test method --- src/wormhole/test/test_cli.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/wormhole/test/test_cli.py b/src/wormhole/test/test_cli.py index 90fdbe4..45dfab7 100644 --- a/src/wormhole/test/test_cli.py +++ b/src/wormhole/test/test_cli.py @@ -1172,6 +1172,14 @@ class Dispatch(unittest.TestCase): self.assertEqual(cfg.stderr.getvalue(), expected) +class FakeConfig(object): + no_daemon = True + blur_usage = True + advertise_version = u"fake.version.1" + transit = str('tcp:4321') + rendezvous = str('tcp:1234') + signal_error = True + allow_list = False class Server(unittest.TestCase): def setUp(self): @@ -1183,15 +1191,6 @@ class Server(unittest.TestCase): self.assertEqual(0, result.exit_code) def test_server_plugin(self): - class FakeConfig(object): - no_daemon = True - blur_usage = True - advertise_version = u"fake.version.1" - transit = str('tcp:4321') - rendezvous = str('tcp:1234') - signal_error = True - allow_list = False - cfg = FakeConfig() plugin = MyPlugin(cfg) relay = plugin.makeService(None)