Commit c354f620 authored by Jérome Perrin's avatar Jérome Perrin

software/seleniumserver/test: python3 compatibility

parent 57f128b5
...@@ -31,7 +31,7 @@ import multiprocessing ...@@ -31,7 +31,7 @@ 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
...@@ -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>
...@@ -102,7 +102,7 @@ class WebServerMixin(object): ...@@ -102,7 +102,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>
...@@ -385,7 +385,7 @@ class TestSSHServer(SeleniumServerTestCase): ...@@ -385,7 +385,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(BrowserCompatibilityMixin, SeleniumServerTestCase): class TestFirefox52(BrowserCompatibilityMixin, SeleniumServerTestCase):
......
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