From 6ea5e8b013dea94817772543feb283ca951e1996 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 4 Mar 2014 01:15:16 +0100 Subject: [PATCH] Pass bytes to NamedTemporaryFile.write() In Python 3, this function takes bytes as an input. Change-Id: I45faa50c4796605885489c9003a1b23b0f0b3080 --- heatclient/tests/test_shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heatclient/tests/test_shell.py b/heatclient/tests/test_shell.py index 09d114f0..06961dbf 100644 --- a/heatclient/tests/test_shell.py +++ b/heatclient/tests/test_shell.py @@ -1321,7 +1321,7 @@ class ShellTestResources(ShellBase): self.m.ReplayAll() with tempfile.NamedTemporaryFile() as data_file: - data_file.write('{"message":"Content"}') + data_file.write(b'{"message":"Content"}') data_file.flush() text = self.shell( 'resource-signal {0} {1} -f {2}'.format(