From f7f0c933b341ecf5fbb0d08e8306f235df0781d4 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Sat, 8 Jan 2022 08:45:46 -0500 Subject: [PATCH] Use FilePath instead of os.path --- src/_zkapauthorizer/tests/test_plugin.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/_zkapauthorizer/tests/test_plugin.py b/src/_zkapauthorizer/tests/test_plugin.py index 01b56e4..27e2a5a 100644 --- a/src/_zkapauthorizer/tests/test_plugin.py +++ b/src/_zkapauthorizer/tests/test_plugin.py @@ -16,7 +16,6 @@ Tests for the Tahoe-LAFS plugin. """ -import os.path from datetime import timedelta from functools import partial from io import StringIO @@ -623,9 +622,8 @@ class LeaseMaintenanceServiceTests(TestCase): # and unicode in an os.path.join() call that always fails with a # TypeError. def write_private_config(name, value): - privname = os.path.join(config._basedir, u"private", name) - with open(privname, "wb") as f: - f.write(value) + privpath = FilePath(config._basedir).descendant([u"private", name]) + privpath.setContent(value) if servers_yaml is not None: # Provide it a statically configured server to connect to. -- GitLab