Commit 95643a1e authored by Jérome Perrin's avatar Jérome Perrin

software/seleniumserver/test: support python3

parent 7c0a8377
......@@ -51,6 +51,7 @@ setup(
'image',
'requests',
'paramiko',
'six',
],
zip_safe=True,
test_suite='test',
......
......@@ -31,11 +31,11 @@ import multiprocessing
import os
import tempfile
import unittest
import urlparse
import six.moves.urllib.parse as urlparse
import base64
import hashlib
import contextlib
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from io import BytesIO
import paramiko
......@@ -76,7 +76,7 @@ class WebServerMixin(object):
self.send_response(200)
self.end_headers()
self.wfile.write(
'''
b'''
<html>
<title>Test page</title>
<body>
......@@ -104,7 +104,7 @@ class WebServerMixin(object):
if form.has_key('f'):
file_data = form['f'].file.read()
self.wfile.write(
'''
b'''
<html>
<title>%s</title>
<div>%s</div>
......@@ -397,7 +397,7 @@ class TestSSHServer(SeleniumServerTestCase):
received += r
if 'Selenium Server.' in received:
break
self.assertIn("Welcome to SlapOS Selenium Server.", received)
self.assertIn(b"Welcome to SlapOS Selenium Server.", received)
class TestFirefox52(
......
......@@ -224,6 +224,7 @@ tests =
${slapos.test.kvm-setup:setup}
${slapos.test.slaprunner-setup:setup}
${slapos.test.proftpd-setup:setup}
${slapos.test.seleniumserver-setup:setup}
${:extra}
extra =
${slapos.cookbook-setup:setup}
......@@ -235,7 +236,6 @@ extra =
${slapos.test.plantuml-setup:setup}
${slapos.test.powerdns-setup:setup}
${slapos.test.re6stnet-setup:setup}
${slapos.test.seleniumserver-setup:setup}
${slapos.test.helloworld-setup:setup}
${slapos.test.jstestnode-setup:setup}
${slapos.test.jupyter-setup:setup}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment