|
6 | 6 |
|
7 | 7 | from tests import normalize_item
|
8 | 8 | from vdirsyncer.exceptions import UserError
|
9 |
| -from vdirsyncer.http import BasicAuthMethod, DigestAuthMethod |
| 9 | +from vdirsyncer.http import BasicAuthMethod |
| 10 | +from vdirsyncer.http import DigestAuthMethod |
10 | 11 | from vdirsyncer.storage.http import HttpStorage
|
11 | 12 | from vdirsyncer.storage.http import prepare_auth
|
12 | 13 |
|
@@ -106,20 +107,12 @@ def test_prepare_auth():
|
106 | 107 | assert "unknown authentication method" in str(excinfo.value).lower()
|
107 | 108 |
|
108 | 109 |
|
109 |
| -def test_prepare_auth_guess(monkeypatch): |
110 |
| - import requests_toolbelt.auth.guess |
111 |
| - |
112 |
| - assert isinstance( |
113 |
| - prepare_auth("guess", "user", "pwd"), |
114 |
| - requests_toolbelt.auth.guess.GuessAuth, |
115 |
| - ) |
116 |
| - |
117 |
| - monkeypatch.delattr(requests_toolbelt.auth.guess, "GuessAuth") |
118 |
| - |
| 110 | +def test_prepare_auth_guess(): |
| 111 | + # guess auth is currently not supported |
119 | 112 | with pytest.raises(UserError) as excinfo:
|
120 |
| - prepare_auth("guess", "user", "pwd") |
| 113 | + prepare_auth("guess", "usr", "pwd") |
121 | 114 |
|
122 |
| - assert "requests_toolbelt is too old" in str(excinfo.value).lower() |
| 115 | + assert "not supported" in str(excinfo.value).lower() |
123 | 116 |
|
124 | 117 |
|
125 | 118 | def test_verify_false_disallowed(aio_connector):
|
|
0 commit comments