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

software/seleniumserver/test: support python3

parent 7c0a8377
Pipeline #9121 canceled with stage
in 0 seconds
...@@ -51,6 +51,7 @@ setup( ...@@ -51,6 +51,7 @@ setup(
'image', 'image',
'requests', 'requests',
'paramiko', 'paramiko',
'six',
], ],
zip_safe=True, zip_safe=True,
test_suite='test', test_suite='test',
......
...@@ -31,11 +31,11 @@ import multiprocessing ...@@ -31,11 +31,11 @@ import multiprocessing
import os import os
import tempfile import tempfile
import unittest import unittest
import urlparse import six.moves.urllib.parse as urlparse
import base64 import base64
import hashlib import hashlib
import contextlib import contextlib
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from io import BytesIO from io import BytesIO
import paramiko import paramiko
...@@ -76,7 +76,7 @@ class WebServerMixin(object): ...@@ -76,7 +76,7 @@ class WebServerMixin(object):
self.send_response(200) self.send_response(200)
self.end_headers() self.end_headers()
self.wfile.write( self.wfile.write(
''' b'''
<html> <html>
<title>Test page</title> <title>Test page</title>
<body> <body>
...@@ -104,7 +104,7 @@ class WebServerMixin(object): ...@@ -104,7 +104,7 @@ class WebServerMixin(object):
if form.has_key('f'): if form.has_key('f'):
file_data = form['f'].file.read() file_data = form['f'].file.read()
self.wfile.write( self.wfile.write(
''' b'''
<html> <html>
<title>%s</title> <title>%s</title>
<div>%s</div> <div>%s</div>
...@@ -397,7 +397,7 @@ class TestSSHServer(SeleniumServerTestCase): ...@@ -397,7 +397,7 @@ class TestSSHServer(SeleniumServerTestCase):
received += r received += r
if 'Selenium Server.' in received: if 'Selenium Server.' in received:
break break
self.assertIn("Welcome to SlapOS Selenium Server.", received) self.assertIn(b"Welcome to SlapOS Selenium Server.", received)
class TestFirefox52( class TestFirefox52(
......
...@@ -224,6 +224,7 @@ tests = ...@@ -224,6 +224,7 @@ tests =
${slapos.test.kvm-setup:setup} ${slapos.test.kvm-setup:setup}
${slapos.test.slaprunner-setup:setup} ${slapos.test.slaprunner-setup:setup}
${slapos.test.proftpd-setup:setup} ${slapos.test.proftpd-setup:setup}
${slapos.test.seleniumserver-setup:setup}
${:extra} ${:extra}
extra = extra =
${slapos.cookbook-setup:setup} ${slapos.cookbook-setup:setup}
...@@ -235,7 +236,6 @@ extra = ...@@ -235,7 +236,6 @@ extra =
${slapos.test.plantuml-setup:setup} ${slapos.test.plantuml-setup:setup}
${slapos.test.powerdns-setup:setup} ${slapos.test.powerdns-setup:setup}
${slapos.test.re6stnet-setup:setup} ${slapos.test.re6stnet-setup:setup}
${slapos.test.seleniumserver-setup:setup}
${slapos.test.helloworld-setup:setup} ${slapos.test.helloworld-setup:setup}
${slapos.test.jstestnode-setup:setup} ${slapos.test.jstestnode-setup:setup}
${slapos.test.jupyter-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