mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-17 23:08:21 +00:00
better docstrings
This commit is contained in:
@ -535,7 +535,6 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin):
|
|||||||
s.setServiceParent(self.sparent)
|
s.setServiceParent(self.sparent)
|
||||||
return s
|
return s
|
||||||
|
|
||||||
# @inlineCallbacks
|
|
||||||
def _create_introducer(self):
|
def _create_introducer(self):
|
||||||
"""
|
"""
|
||||||
:returns: (via Deferred) an Introducer instance
|
:returns: (via Deferred) an Introducer instance
|
||||||
|
@ -438,6 +438,9 @@ class Provider_CheckOnionConfig(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_no_launch_no_control(self):
|
def test_no_launch_no_control(self):
|
||||||
|
"""
|
||||||
|
onion=true but no way to launch/connect to tor
|
||||||
|
"""
|
||||||
with self.assertRaises(ValueError) as ctx:
|
with self.assertRaises(ValueError) as ctx:
|
||||||
tor_provider.create("reactor", FakeConfig(onion=True))
|
tor_provider.create("reactor", FakeConfig(onion=True))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@ -446,7 +449,10 @@ class Provider_CheckOnionConfig(unittest.TestCase):
|
|||||||
"launch=true nor control.port="
|
"launch=true nor control.port="
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_missing_keys0(self):
|
def test_onion_no_local_port(self):
|
||||||
|
"""
|
||||||
|
onion=true but no local_port configured is an error
|
||||||
|
"""
|
||||||
with self.assertRaises(ValueError) as ctx:
|
with self.assertRaises(ValueError) as ctx:
|
||||||
tor_provider.create("reactor", FakeConfig(onion=True, launch=True))
|
tor_provider.create("reactor", FakeConfig(onion=True, launch=True))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@ -455,7 +461,10 @@ class Provider_CheckOnionConfig(unittest.TestCase):
|
|||||||
"but onion.local_port= is missing"
|
"but onion.local_port= is missing"
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_missing_keys1(self):
|
def test_onion_no_external_port(self):
|
||||||
|
"""
|
||||||
|
onion=true but no external_port configured is an error
|
||||||
|
"""
|
||||||
with self.assertRaises(ValueError) as ctx:
|
with self.assertRaises(ValueError) as ctx:
|
||||||
tor_provider.create("reactor",
|
tor_provider.create("reactor",
|
||||||
FakeConfig(onion=True, launch=True,
|
FakeConfig(onion=True, launch=True,
|
||||||
@ -466,7 +475,10 @@ class Provider_CheckOnionConfig(unittest.TestCase):
|
|||||||
"[tor] onion = true, but onion.external_port= is missing"
|
"[tor] onion = true, but onion.external_port= is missing"
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_missing_keys2(self):
|
def test_onion_no_private_key_file(self):
|
||||||
|
"""
|
||||||
|
onion=true but no private_key_file configured is an error
|
||||||
|
"""
|
||||||
with self.assertRaises(ValueError) as ctx:
|
with self.assertRaises(ValueError) as ctx:
|
||||||
tor_provider.create("reactor",
|
tor_provider.create("reactor",
|
||||||
FakeConfig(onion=True, launch=True,
|
FakeConfig(onion=True, launch=True,
|
||||||
@ -487,6 +499,7 @@ class Provider_CheckOnionConfig(unittest.TestCase):
|
|||||||
}))
|
}))
|
||||||
p.check_onion_config()
|
p.check_onion_config()
|
||||||
|
|
||||||
|
|
||||||
class Provider_Service(unittest.TestCase):
|
class Provider_Service(unittest.TestCase):
|
||||||
def test_no_onion(self):
|
def test_no_onion(self):
|
||||||
reactor = object()
|
reactor = object()
|
||||||
|
Reference in New Issue
Block a user