From 39985b168b171f6e251824121a476074e7e2085e Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Sat, 8 Jan 2022 11:49:25 -0500
Subject: [PATCH] It's already a text-mode FilePath, right?

TempDir.join(unicode) returns unicode
TempDir.join(bytes) raises an Exception
FilePath(unicode) produces a text-mode FilePath
StorageServer.__init__ raises an exception if passed bytes

So we can just rely on self.tempdir.path being the correct type already and
even if it weren't StorageServer would immediately tell us.
---
 src/_zkapauthorizer/tests/fixtures.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/_zkapauthorizer/tests/fixtures.py b/src/_zkapauthorizer/tests/fixtures.py
index 9ed90e1..54d27b9 100644
--- a/src/_zkapauthorizer/tests/fixtures.py
+++ b/src/_zkapauthorizer/tests/fixtures.py
@@ -49,7 +49,7 @@ class AnonymousStorageServer(Fixture):
     def _setUp(self):
         self.tempdir = FilePath(self.useFixture(TempDir()).join(u"storage"))
         self.storage_server = StorageServer(
-            self.tempdir.asTextMode().path,
+            self.tempdir.path,
             b"x" * 20,
             clock=self.clock,
         )
-- 
GitLab