Skip to content

Commit

Permalink
Remove checks on exception messages for CrossBrowserTesting authentic…
Browse files Browse the repository at this point in the history
…ation failures
  • Loading branch information
davehunt committed Jun 21, 2017
1 parent 52cf240 commit 91bf8ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ env:
global:
- DISPLAY=:99.0
- PYTEST_ADDOPTS="-m 'not (chrome or edge or safari or phantomjs)'"
matrix:
- TOXENV=pytest29
- TOXENV=pytest30
matrix:
include:
- python: 2.7
Expand Down Expand Up @@ -47,4 +44,4 @@ deploy:
tags: true
repo: pytest-dev/pytest-selenium
python: 3.6
condition: "$TOXENV = pytest30"
condition: "$TOXENV" = ""
8 changes: 2 additions & 6 deletions testing/test_crossbrowsertesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,11 @@ def test_invalid_credentials_env(failure, monkeypatch, tmpdir, username, key):
monkeypatch.setattr(os.path, 'expanduser', lambda p: str(tmpdir))
monkeypatch.setenv(username, 'foo')
monkeypatch.setenv(key, 'bar')
out = failure('--capability', 'browser_api_name', 'FF46')
messages = ['User not found!', 'basic auth failed']
assert any(message in out for message in messages)
failure('--capability', 'browser_api_name', 'FF46')


def test_invalid_credentials_file(failure, monkeypatch, tmpdir):
monkeypatch.setattr(os.path, 'expanduser', lambda p: str(tmpdir))
config = tmpdir.join('.crossbrowsertesting')
config.write('[credentials]\nusername=foo\nkey=bar')
out = failure('--capability', 'browser_api_name', 'FF46')
messages = ['User not found!', 'basic auth failed']
assert any(message in out for message in messages)
failure('--capability', 'browser_api_name', 'FF46')
9 changes: 3 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
# and then run "tox" from this directory.

[tox]
envlist = py{27,36,py,py3}-pytest{29,30}, docs, flake8
envlist = py{27,36,py,py3}, docs, flake8

[testenv]
passenv = DISPLAY PYTEST_ADDOPTS
deps =
pytest29: pytest==2.9.2
pytest30: pytest==3.0.7
pytest-localserver
commands = py.test -v -r a {posargs}
deps = pytest-localserver
commands = pytest -v -r a {posargs}

[testenv:docs]
basepython = python
Expand Down

0 comments on commit 91bf8ef

Please sign in to comment.