aboutsummaryrefslogtreecommitdiff
path: root/tools/test-integration.py
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-27 16:19:49 -0800
committerAnton Tananaev <anton@traccar.org>2022-11-27 16:19:49 -0800
commit6142cf557dc130828c12dbfb25ab18eda4bc0f7d (patch)
treea8d3b981796f2e5dc68be9e401afa5d6297abbbb /tools/test-integration.py
parent938872ff5e2fad867720ec9c971ea432ba623c2c (diff)
downloadtrackermap-server-6142cf557dc130828c12dbfb25ab18eda4bc0f7d.tar.gz
trackermap-server-6142cf557dc130828c12dbfb25ab18eda4bc0f7d.tar.bz2
trackermap-server-6142cf557dc130828c12dbfb25ab18eda4bc0f7d.zip
Update python scripts
Diffstat (limited to 'tools/test-integration.py')
-rwxr-xr-xtools/test-integration.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/test-integration.py b/tools/test-integration.py
index f926a8ae9..89f1c76ed 100755
--- a/tools/test-integration.py
+++ b/tools/test-integration.py
@@ -140,7 +140,7 @@ def load_ports():
def login():
request = urllib2.Request(baseUrl + '/api/session')
- response = urllib2.urlopen(request, urllib.urlencode(user))
+ response = urllib2.urlopen(request, urllib.parse.urlencode(user))
if debug:
print '\nlogin: %s\n' % repr(json.load(response))
return response.headers.get('Set-Cookie')
@@ -176,7 +176,7 @@ def send_message(port, message):
def get_protocols(cookie, device_id):
params = { 'deviceId' : device_id, 'from' : '2000-01-01T00:00:00.000Z', 'to' : '2050-01-01T00:00:00.000Z' }
- request = urllib2.Request(baseUrl + '/api/positions?' + urllib.urlencode(params))
+ request = urllib2.Request(baseUrl + '/api/positions?' + urllib.parse.urlencode(params))
request.add_header('Cookie', cookie)
request.add_header('Content-Type', 'application/json')
request.add_header('Accept', 'application/json')