Skip to content

Commit

Permalink
Merge branch 'master' of https://tonyandrewmeyer@github.com/SpamExper…
Browse files Browse the repository at this point in the history
…ts/pyzor.git
  • Loading branch information
tonyandrewmeyer committed Feb 19, 2016
2 parents fb6c34c + f16e1b6 commit 5c88c38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/functional/test_pyzor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import io
import sys
import redis
import unittest
Expand Down Expand Up @@ -128,7 +129,7 @@ def test_mbox_style(self):
self.assertEqual(r["WL-Count"], "1")

def test_mbox_real(self):
with open(MBOX_FILE_PATH) as mbox_file:
with io.open(MBOX_FILE_PATH, 'rt', encoding='latin-1') as mbox_file:
input = mbox_file.read()
self.client_args["-s"] = "mbox"
self.check_pyzor("pong", None, input=input, code=200, exit_code=0,
Expand Down
2 changes: 1 addition & 1 deletion tests/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def check_pyzor(self, cmd, user, input=None,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
if input:
stdout, stderr = pyzor.communicate(input)
stdout, stderr = pyzor.communicate(input.encode("utf8"))
else:
stdout, stderr = pyzor.communicate()

Expand Down

0 comments on commit 5c88c38

Please sign in to comment.