Correct byte types and encoding in test script
[mudpy.git] / bin / test
index 9dec9f4..45ce5aa 100755 (executable)
--- a/bin/test
+++ b/bin/test
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 """Regression test script for the mudpy engine."""
 
-# Copyright (c) 2004-2011 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-2013 Jeremy Stanley <fungi@yuggoth.org>. Permission
 # to use, copy, modify, and distribute this software is granted under
 # terms provided in the LICENSE file distributed with this software.
 
@@ -28,6 +28,6 @@ import telnetlib
 mud = telnetlib.Telnet()
 mud.open("::1", 6669)
 for question, answer in conversation:
-    mud.read_until("%s " % question)
-    mud.write("%s\r\n" % answer)
+    mud.read_until(("%s " % question).encode("utf-8"))
+    mud.write(("%s\r\n" % answer).encode("utf-8"))
 mud.close()