diff --git a/src/_zkapauthorizer/tests/test_plugin.py b/src/_zkapauthorizer/tests/test_plugin.py index 295cc55e38a39b283a119b5a1f407e2244898f45..34025969f5f73f34475933f93a8e2d39705e7f8c 100644 --- a/src/_zkapauthorizer/tests/test_plugin.py +++ b/src/_zkapauthorizer/tests/test_plugin.py @@ -20,7 +20,7 @@ from __future__ import ( absolute_import, ) -from io import ( +from StringIO import ( StringIO, ) from os import ( @@ -397,6 +397,11 @@ class ClientPluginTests(TestCase): b"tub.port", config_text.encode("utf-8"), ) + # On Tahoe-LAFS <1.16, the config is written as bytes. + # On Tahoe-LAFS >=1.16, the config is written as unicode. + # + # After support for Tahoe <1.16 support is dropped we probably want to + # switch to an io.StringIO here. config_text = StringIO() node_config.config.write(config_text) self.addDetail(u"config", text_content(config_text.getvalue()))