aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-10-06 12:14:59 +0200
committerDaniel Lange <DLange@git.local>2020-10-06 12:26:50 +0200
commita911bec64c178df0cf2c57720d5f4900eb8aa314 (patch)
tree71aca2b40c14bf6cac43aa47d5666076354e803d
parent23728d0a4224630dcb1c46160de1f3cda7b9e220 (diff)
downloadsupybot_github-a911bec64c178df0cf2c57720d5f4900eb8aa314.tar.gz
supybot_github-a911bec64c178df0cf2c57720d5f4900eb8aa314.tar.bz2
supybot_github-a911bec64c178df0cf2c57720d5f4900eb8aa314.zip
Convert "content" to bytes for testing (python3 fix)
-rw-r--r--local/testing/ExpectationPluginTestCase.py3
1 files changed, 2 insertions, 1 deletions
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"""

© 2014-2024 Faster IT GmbH | imprint | privacy policy