mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 03:14:21 +00:00
flake8
This commit is contained in:
parent
27ea11d164
commit
5000787c18
@ -28,7 +28,6 @@ from allmydata.history import History
|
||||
from allmydata.interfaces import IStatsProducer, SDMF_VERSION, MDMF_VERSION
|
||||
from allmydata.nodemaker import NodeMaker
|
||||
from allmydata.blacklist import Blacklist
|
||||
from allmydata import node
|
||||
|
||||
|
||||
KiB=1024
|
||||
|
@ -216,7 +216,6 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
def test_web_apiauthtoken(self):
|
||||
basedir = u"client.Basic.test_web_apiauthtoken"
|
||||
create_node_dir(basedir, "testing")
|
||||
config = read_config(basedir, "portnum")
|
||||
|
||||
c = client.create_client(basedir)
|
||||
# this must come after we create the client, as it will create
|
||||
@ -255,7 +254,7 @@ class Basic(testutil.ReallyEqualMixin, testutil.NonASCIIPathMixin, unittest.Test
|
||||
'host_privkey_file = privkey\n'
|
||||
)
|
||||
with mock.patch('allmydata.frontends.sftpd.SFTPServer') as p:
|
||||
c = client.create_client(basedir)
|
||||
client.create_client(basedir)
|
||||
self.assertTrue(p.called)
|
||||
|
||||
def test_ftp_auth_keyfile(self):
|
||||
|
@ -141,7 +141,7 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
|
||||
basedir = u"test_node/test_config_required"
|
||||
config = read_config(basedir, "portnum")
|
||||
|
||||
with self.assertRaises(Exception) as ctx:
|
||||
with self.assertRaises(Exception):
|
||||
config.get_config_from_file("it_does_not_exist", required=True)
|
||||
|
||||
def test_private_config_unreadable(self):
|
||||
@ -152,7 +152,7 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
|
||||
fname = os.path.join(basedir, "private", "foo")
|
||||
os.chmod(fname, 0)
|
||||
|
||||
with self.assertRaises(Exception) as ctx:
|
||||
with self.assertRaises(Exception):
|
||||
config.get_or_create_private_config("foo")
|
||||
|
||||
def test_private_config_unreadable_preexisting(self):
|
||||
@ -164,7 +164,7 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
|
||||
f.write("stuff")
|
||||
os.chmod(fname, 0)
|
||||
|
||||
with self.assertRaises(Exception) as ctx:
|
||||
with self.assertRaises(Exception):
|
||||
config.get_private_config("foo")
|
||||
|
||||
def test_private_config_missing(self):
|
||||
@ -172,7 +172,7 @@ class TestCase(testutil.SignalMixin, unittest.TestCase):
|
||||
create_node_dir(basedir, "testing")
|
||||
config = read_config(basedir, "portnum")
|
||||
|
||||
with self.assertRaises(MissingConfigEntry) as ctx:
|
||||
with self.assertRaises(MissingConfigEntry):
|
||||
config.get_or_create_private_config("foo")
|
||||
|
||||
def test_private_config(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user