diff --git a/tests/python/tests/test_handle.py b/tests/python/tests/test_handle.py index 36ae590d..a84de641 100644 --- a/tests/python/tests/test_handle.py +++ b/tests/python/tests/test_handle.py @@ -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) diff --git a/tests/test_handle.c b/tests/test_handle.c index 180cf49a..6da97090 100644 --- a/tests/test_handle.c +++ b/tests/test_handle.c @@ -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); }