flake8 cleanup

This commit is contained in:
meejah 2021-01-25 15:23:47 -07:00
parent 75db6f3e62
commit 7aaf86ac94
3 changed files with 5 additions and 8 deletions

View File

@ -1,7 +1,6 @@
import json
from io import (
BytesIO,
StringIO,
)
from twisted.python.usage import (
@ -12,8 +11,6 @@ from twisted.python.filepath import (
)
from allmydata.scripts.admin import (
AdminCommand,
AddGridManagerCertOptions,
add_grid_manager_cert,
)
from allmydata.scripts.runner import (
@ -69,7 +66,7 @@ class AddCertificateOptions(SyncTestCase):
json.dump(fake_cert, f)
# certificate should be loaded
o = self.tahoe.parseOptions(
self.tahoe.parseOptions(
[
"admin", "add-grid-manager-cert",
"--name", "random-name",

View File

@ -139,8 +139,8 @@ class GridManagerCommandLine(SyncTestCase):
with self.runner.isolated_filesystem():
self.runner.invoke(grid_manager, ["--config", "foo", "create"])
self.runner.invoke(grid_manager, ["--config", "foo", "add", "storage0", pubkey])
result = self.runner.invoke(grid_manager, ["--config", "foo", "sign", "storage0", "10"])
result = self.runner.invoke(grid_manager, ["--config", "foo", "sign", "storage0", "10"])
self.runner.invoke(grid_manager, ["--config", "foo", "sign", "storage0", "10"])
self.runner.invoke(grid_manager, ["--config", "foo", "sign", "storage0", "10"])
# we should now have two certificates stored
self.assertEqual(
set(FilePath("foo").listdir()),

View File

@ -108,7 +108,7 @@ class GridManagerUtilities(SyncTestCase):
)
config = config_from_string("/foo", "portnum", config_data, client_valid_config())
with self.assertRaises(ValueError) as ctx:
certs = config.get_grid_manager_certificates()
config.get_grid_manager_certificates()
self.assertIn(
"Unknown key in Grid Manager certificate",
@ -128,7 +128,7 @@ class GridManagerUtilities(SyncTestCase):
)
config = config_from_string("/foo", "portnum", config_data, client_valid_config())
with self.assertRaises(ValueError) as ctx:
certs = config.get_grid_manager_certificates()
config.get_grid_manager_certificates()
# we don't reliably know how Windows or MacOS will represent
# the path in the exception, so we don't check for the *exact*
# message with full-path here..