Convert tests to Python 3

Fix #938
This commit is contained in:
Lorenzo Bolla
2022-01-27 11:35:35 +01:00
parent a40cfc679c
commit 035d5314b0
27 changed files with 241 additions and 284 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
import requests_unixsocket
import urllib
import urllib.error
import urllib.parse
import urllib.request
import os
import os.path
@@ -42,5 +44,5 @@ class SystemdAPIHandoverTest(BaseTest):
print("Skipping test as we failed to setup a listener.")
return
session = requests_unixsocket.Session()
r = session.get('http+unix://%s/api/version' % urllib.quote(self.socket_path, safe=''))
r = session.get('http+unix://%s/api/version' % urllib.parse.quote(self.socket_path, safe=''))
self.check_equal(r.json(), {'Version': os.environ['APTLY_VERSION']})