Skip to content

Commit

Permalink
Testingbot credentials (pytest-dev#191)
Browse files Browse the repository at this point in the history
Move credentials to capabilities
  • Loading branch information
BeyondEvil authored Sep 16, 2018
1 parent 497a723 commit 1729774
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pytest_selenium/drivers/testingbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pytest_selenium.drivers.cloud import Provider

HOST = "hub.testingbot.com"
PORT = 80
PORT = 443


class TestingBot(Provider):
Expand All @@ -29,7 +29,7 @@ def auth(self):

@property
def executor(self):
return "http://{0.key}:{0.secret}@{0.host}:{0.port}/wd/hub".format(self)
return "https://{0.host}:{0.port}/wd/hub".format(self)

@property
def key(self):
Expand Down Expand Up @@ -84,6 +84,8 @@ def driver_kwargs(request, test, capabilities, host, port, **kwargs):
provider = TestingBot(host, port)
keywords = request.node.keywords
capabilities.setdefault("name", test)
capabilities.setdefault("client_key", provider.key)
capabilities.setdefault("client_secret", provider.secret)
markers = [m for m in keywords.keys() if isinstance(keywords[m], MarkInfo)]
groups = capabilities.get("groups", []) + markers
if groups:
Expand Down

0 comments on commit 1729774

Please sign in to comment.