add some docstrings, fix comments

This commit is contained in:
meejah 2018-08-24 16:50:04 -06:00
parent 536ccf8b6d
commit d478cf3831
3 changed files with 15 additions and 0 deletions

View File

@ -214,6 +214,9 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
self.failUnlessRaises(ValueError, client.create_client, basedir)
def test_web_apiauthtoken(self):
"""
Client loads the proper API auth token from disk
"""
basedir = u"client.Basic.test_web_apiauthtoken"
create_node_dir(basedir, "testing")
@ -243,6 +246,9 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
# TODO: also test config options for SFTP.
def test_ftp_create(self):
"""
configuration for sftpd results in it being started
"""
basedir = u"client.Basic.test_ftp_create"
create_node_dir(basedir, "testing")
with open(os.path.join(basedir, "tahoe.cfg"), "w") as f:

View File

@ -42,6 +42,9 @@ class Node(testutil.SignalMixin, testutil.ReallyEqualMixin, unittest.TestCase):
IntroducerNode # pyflakes
def test_create(self):
"""
A brand new introducer creates its config dir
"""
basedir = "introducer.IntroducerNode.test_create"
create_introducer(basedir)
self.assertTrue(os.path.exists(basedir))

View File

@ -138,6 +138,9 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
self.failUnless(config.nickname == nickname)
def test_config_required(self):
"""
Asking for missing (but required) configuration is an error
"""
basedir = u"test_node/test_config_required"
config = read_config(basedir, "portnum")
@ -145,6 +148,9 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
config.get_config_from_file("it_does_not_exist", required=True)
def test_private_config_unreadable(self):
"""
Asking for inaccessible private config is an error
"""
if "win32" in sys.platform.lower() or "cygwin" in sys.platform.lower():
# We don't know how to test that unprivileged users can't read this
# thing. (Also we don't know exactly how to set the permissions so