mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Debug travis
This commit is contained in:
parent
7321da0f02
commit
43d6541d94
2 changed files with 9 additions and 4 deletions
|
|
@ -11,4 +11,4 @@ env:
|
|||
- DAV_SERVER=owncloud REQUIREMENTS=release
|
||||
|
||||
install: "./install-deps.sh"
|
||||
script: "py.test tests/"
|
||||
script: "py.test -l tests/"
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue