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
import time
import os
import json
import base64
from base64 import b64encode
from six.moves.http_client import HTTPConnection
import django
from django.test import LiveServerTestCase
......@@ -103,9 +103,9 @@ class SeleniumTests(LiveServerTestCase, RegistrationTestMixin):
# Use Sauce connect
cls.username = os.environ['SAUCE_USERNAME']
cls.key = os.environ['SAUCE_ACCESS_KEY']
cls.sauce_auth = base64.encodestring(
'{}:{}'.format(cls.username, cls.key)
)[:-1]
cls.sauce_auth = b64encode(
'{}:{}'.format(cls.username, cls.key).encode('utf-8')
)
cls.driver = webdriver.Remote(
desired_capabilities=cls.caps,
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