Commit 553fb910 authored by Michal Čihař's avatar Michal Čihař

Use b64encode directly

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 9fdbdef7
...@@ -23,7 +23,7 @@ from unittest import SkipTest ...@@ -23,7 +23,7 @@ from unittest import SkipTest
import time import time
import os import os
import json import json
import base64 from base64 import b64encode
from six.moves.http_client import HTTPConnection from six.moves.http_client import HTTPConnection
import django import django
from django.test import LiveServerTestCase from django.test import LiveServerTestCase
...@@ -103,9 +103,9 @@ class SeleniumTests(LiveServerTestCase, RegistrationTestMixin): ...@@ -103,9 +103,9 @@ class SeleniumTests(LiveServerTestCase, RegistrationTestMixin):
# Use Sauce connect # Use Sauce connect
cls.username = os.environ['SAUCE_USERNAME'] cls.username = os.environ['SAUCE_USERNAME']
cls.key = os.environ['SAUCE_ACCESS_KEY'] cls.key = os.environ['SAUCE_ACCESS_KEY']
cls.sauce_auth = base64.encodestring( cls.sauce_auth = b64encode(
'{}:{}'.format(cls.username, cls.key) '{}:{}'.format(cls.username, cls.key).encode('utf-8')
)[:-1] )
cls.driver = webdriver.Remote( cls.driver = webdriver.Remote(
desired_capabilities=cls.caps, desired_capabilities=cls.caps,
command_executor="http://{0}:{1}@{2}/wd/hub".format( command_executor="http://{0}:{1}@{2}/wd/hub".format(
......
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