mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
add some docstrings, fix comments
This commit is contained in:
parent
536ccf8b6d
commit
d478cf3831
@ -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:
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user