Debug travis

This commit is contained in:
Markus Unterwaditzer 2014-03-28 16:23:56 +01:00
parent 7321da0f02
commit 43d6541d94
2 changed files with 9 additions and 4 deletions

View file

@ -11,4 +11,4 @@ env:
- DAV_SERVER=owncloud REQUIREMENTS=release
install: "./install-deps.sh"
script: "py.test tests/"
script: "py.test -l tests/"

View file

@ -42,9 +42,11 @@ def test_get_password_from_netrc(monkeypatch):
return username, 'bogus', password
import netrc
monkeypatch.setattr(netrc.netrc, 'authenticators', authenticators)
import getpass
monkeypatch.setattr(getpass, 'getpass', None)
_password = utils.get_password(username, resource)
assert _password == password
assert calls == [hostname]
@ -82,12 +84,15 @@ def test_get_password_from_system_keyring(monkeypatch, resources_to_test):
import netrc
netrc_calls = []
def authenticators(self, h):
netrc_calls.append(h)
def authenticators(self, hostname):
netrc_calls.append(hostname)
return None
monkeypatch.setattr(netrc.netrc, 'authenticators', authenticators)
import getpass
monkeypatch.setattr(getpass, 'getpass', None)
_password = utils.get_password(username, resource)
assert _password == password
assert netrc_calls == [hostname]