a ‚oe¤ã@sœdZddlZddlZddlmZddlZddlmZddlmZddl m Z Gdd„dej ƒZ Gd d „d ej ƒZ ed kr˜e e ejd d…eg¡¡dS) zTests for certbot.errors.éN)Úmock)Úmessages)Ú achallenges)Ú acme_utilc@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚFailedChallengesTestz*Tests for certbot.errors.FailedChallenges.c Cs@ddlm}|tjdtjtjdtjj ddd�d�d�hƒ|_ dS) Nr©ÚFailedChallengesú example.comÚtlsÚdetail©r ©ZchallZuriÚerror©ÚdomainZchallb) Úcertbot.errorsrrÚDNSrÚ ChallengeBodyrÚDNS01ÚErrorÚ with_coder)Úselfr©rúDC:\Program Files\Certbot\pkgs\certbot\_internal\tests\errors_test.pyÚsetUps þÿzFailedChallengesTest.setUpcCst|jƒ d¡sJ‚dS)NúTFailed authorization procedure. example.com (dns-01): urn:ietf:params:acme:error:tls©ÚstrrÚ startswith©rrrrÚtest_strs ÿzFailedChallengesTest.test_strc CsTddlm}d}|tjdtjtjdtjj d|d�d�d�hƒ}t |ƒ  d ¡sPJ‚dS) Nrru عدالةr r r r rr) rrrrrrrrrrrr)rrZ arabic_detailZ arabic_errorrrrÚ test_unicodes þÿ ÿz!FailedChallengesTest.test_unicodeN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rr r!rrrrr src@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚStandaloneBindErrorTestz-Tests for certbot.errors.StandaloneBindError.cCs ddlm}|tjjdƒ|_dS)Nr)ÚStandaloneBindErroréÒ)rr'rÚsentinelr)rr'rrrr,s zStandaloneBindErrorTest.setUpcCs(tjj|jjksJ‚d|jjks$J‚dS)Nr()rr)rZ socket_errorÚportrrrrÚtest_instance_args0sz*StandaloneBindErrorTest.test_instance_argscCst|jƒ d¡sJ‚dS)NzProblem binding to port 1234: rrrrrr 4s ÿz StandaloneBindErrorTest.test_strN)r"r#r$r%rr+r rrrrr&)sr&Ú__main__é)r%ÚsysZunittestrZpytestZacmerZcertbotrZ certbot.testsrZTestCaserr&r"ÚexitÚmainÚargvÚ__file__rrrrÚs