aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-10-06 12:14:59 +0200
committeralezakos <electrovesta@gmail.com>2020-10-18 22:22:35 +0300
commit61c89e9263fe1d91bc0d4c4088b5b7175d12c576 (patch)
tree298e022e1c2044e985d401a76b5392d8589d324e
parent8df19a68fa20faea960f1a72500b702dcc4c1f1e (diff)
downloadsupybot_github-61c89e9263fe1d91bc0d4c4088b5b7175d12c576.tar.gz
supybot_github-61c89e9263fe1d91bc0d4c4088b5b7175d12c576.tar.bz2
supybot_github-61c89e9263fe1d91bc0d4c4088b5b7175d12c576.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