Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Adapt to CURL without NTLM support #320

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions tests/python/tests/test_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,22 @@ def test_handle_setget_attr(self):
self.assertEqual(h.httpheader, None)

self.assertEqual(h.httpauthmethods, librepo.LR_AUTH_BASIC)
h.httpauthmethods = librepo.LR_AUTH_NTLM
self.assertEqual(h.httpauthmethods, librepo.LR_AUTH_NTLM)
try:
h.httpauthmethods = librepo.LR_AUTH_NTLM
except librepo.LibrepoException as exception:
if not "not found built-in" in str(exception):
raise exception
self.assertEqual(h.httpauthmethods, librepo.LR_AUTH_NTLM)
h.httpauthmethods = None
self.assertEqual(h.httpauthmethods, librepo.LR_AUTH_BASIC)

self.assertEqual(h.proxyauthmethods, librepo.LR_AUTH_BASIC)
h.proxyauthmethods = librepo.LR_AUTH_NTLM
self.assertEqual(h.proxyauthmethods, librepo.LR_AUTH_NTLM)
try:
h.proxyauthmethods = librepo.LR_AUTH_NTLM
except librepo.LibrepoException as exception:
if not "not found built-in" in str(exception):
raise exception
self.assertEqual(h.proxyauthmethods, librepo.LR_AUTH_NTLM)
h.proxyauthmethods = None
self.assertEqual(h.proxyauthmethods, librepo.LR_AUTH_BASIC)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ START_TEST(test_handle)
ck_assert(lr_handle_setopt(h, NULL, LRO_PROXY_SSLCLIENTCERT, "/etc/proxy_cert.pem"));
ck_assert(lr_handle_setopt(h, NULL, LRO_PROXY_SSLCLIENTKEY, "/etc/proxy_cert.key"));
ck_assert(lr_handle_setopt(h, NULL, LRO_PROXY_SSLCACERT, "/etc/proxy_ca.pem"));
ck_assert(lr_handle_setopt(h, NULL, LRO_HTTPAUTHMETHODS, LR_AUTH_NTLM));
(void)lr_handle_setopt(h, NULL, LRO_HTTPAUTHMETHODS, LR_AUTH_NTLM);
ck_assert(lr_handle_setopt(h, NULL, LRO_PROXYAUTHMETHODS, LR_AUTH_DIGEST));
lr_handle_free(h);
}
Expand Down
Loading