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-18 12:17:01 +0200
commit5ff221e197a69e2e79a3fcc950584d6563051b80 (patch)
tree298e022e1c2044e985d401a76b5392d8589d324e
parentf7c67d1b5e80366c33b252d9027ddf7688a454c3 (diff)
downloadsupybot_github-5ff221e197a69e2e79a3fcc950584d6563051b80.tar.gz
supybot_github-5ff221e197a69e2e79a3fcc950584d6563051b80.tar.bz2
supybot_github-5ff221e197a69e2e79a3fcc950584d6563051b80.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