From 05d2230015e085cba408474539f997f7fecd2f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1o=20Belica?= Date: Tue, 26 Mar 2013 19:55:50 +0100 Subject: [PATCH] Load articles/snippets as binary strings --- tests/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index 8a68b0b..5e1d2f8 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -12,12 +12,12 @@ TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" file_path = join(TEST_DIR, "data/snippets", file_name) - with open(file_path) as file: + with open(file_path, "rb") as file: return file.read() def load_article(file_name): """Helper to fetch in the content of a test article.""" file_path = join(TEST_DIR, "data/articles", file_name) - with open(file_path) as file: + with open(file_path, "rb") as file: return file.read()