Fix S3 tests on Python 3

read_path() can read in binary, which the S3 tests don't support (simply
because they don't need it)...but it needs to be able to take the `mode`
argument anyway.

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
This commit is contained in:
Ryan Gonzalez
2022-05-17 17:45:25 -05:00
committed by André Roth
parent f0bf519d36
commit 859edb10cd

View File

@@ -76,7 +76,10 @@ class S3Test(BaseTest):
if self.check_path(path):
raise Exception("path %s exists" % (path, ))
def read_file(self, path):
def read_file(self, path, mode=''):
# We don't support reading as binary here.
assert not mode
if path.startswith("public/"):
path = path[7:]