diff options
author | Daniel Lange <DLange@git.local> | 2020-10-06 12:14:59 +0200 |
---|---|---|
committer | alezakos <electrovesta@gmail.com> | 2020-10-18 22:22:35 +0300 |
commit | 61c89e9263fe1d91bc0d4c4088b5b7175d12c576 (patch) | |
tree | 298e022e1c2044e985d401a76b5392d8589d324e | |
parent | 8df19a68fa20faea960f1a72500b702dcc4c1f1e (diff) | |
download | supybot_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.py | 3 |
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""" |