Skip to content

Commit

Permalink
make crossbrowsertesting tests more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
BeyondEvil authored and davehunt committed Aug 18, 2018
1 parent 6af9afd commit 6884950
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testing/test_crossbrowsertesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ 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')
failure('--capability', 'browser_api_name', 'FF46')
out = failure('--capability', 'browser_api_name', 'FF46')
messages = ['missing auth', 'basic auth failed']
assert any(message in out for message in messages)


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')
failure('--capability', 'browser_api_name', 'FF46')
out = failure('--capability', 'browser_api_name', 'FF46')
messages = ['missing auth', 'basic auth failed']
assert any(message in out for message in messages)

0 comments on commit 6884950

Please sign in to comment.