From a911bec64c178df0cf2c57720d5f4900eb8aa314 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Tue, 6 Oct 2020 12:14:59 +0200 Subject: Convert "content" to bytes for testing (python3 fix) --- local/testing/ExpectationPluginTestCase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local/testing/ExpectationPluginTestCase.py b/local/testing/ExpectationPluginTestCase.py index 17dd1eb..e6d2ed1 100644 --- a/local/testing/ExpectationPluginTestCase.py +++ b/local/testing/ExpectationPluginTestCase.py @@ -52,7 +52,8 @@ class ExpectationPluginTestCase(PluginTestCase): with open('samples/' + file + '.json', 'r') as content_file: content = content_file.read() self.files[file] = content - urllib.request.urlopen('http://localhost:' + str(self.port), 'payload=' + content) + content = bytes('payload=' + content, 'utf-8') + urllib.request.urlopen('http://localhost:' + str(self.port), content) def conf(self, name, value): """Sets one of the plugin's configuration values""" -- cgit v1.2.3