tests/test-import.t
changeset 37467 9bf65d1b43a6
parent 37466 abd9f5ec1d82
child 37573 49b82cdb5983
--- a/tests/test-import.t	Sun Apr 08 14:46:24 2018 +0900
+++ b/tests/test-import.t	Sun Apr 08 14:59:12 2018 +0900
@@ -288,10 +288,10 @@
   > import email.message, sys
   > msg = email.message.Message()
   > patch = open(sys.argv[1], 'rb').read()
-  > msg.set_payload('email commit message\n' + patch)
+  > msg.set_payload(b'email commit message\n' + patch)
   > msg['Subject'] = 'email patch'
   > msg['From'] = 'email patcher'
-  > open(sys.argv[2], 'wb').write(msg.as_string())
+  > open(sys.argv[2], 'wb').write(bytes(msg))
   > EOF
 
 
@@ -386,10 +386,10 @@
   > import email.message, sys
   > msg = email.message.Message()
   > patch = open(sys.argv[1], 'rb').read()
-  > msg.set_payload('email patch\n\nnext line\n---\n' + patch)
+  > msg.set_payload(b'email patch\n\nnext line\n---\n' + patch)
   > msg['Subject'] = '[PATCH] email patch'
   > msg['From'] = 'email patcher'
-  > open(sys.argv[2], 'wb').write(msg.as_string())
+  > open(sys.argv[2], 'wb').write(bytes(msg))
   > EOF