Spade
Mini Shell
| Directory:~$ /proc/self/root/lib/python2.7/site-packages/certbot/plugins/ |
| [Home] [System Details] [Kill Me] |
�
���_c@s�dZddlZyddlZWn!ek
rEddlmZnXddlmZddlmZddl m
Z
ddlmZddl
mZd Zejjejd
��Zdejfd��YZd
efd��YZdS(s8Base test class for
DNS authenticators built on
Lexicon.i����N(tmock(t HTTPError(tRequestException(terrors(tdns_test_common(tutilsexample.comsrsa512_key.pemtBaseLexiconAuthenticatorTestcBseZd�Zd�ZRS(cCsR|jj|jg�tjjtdttj�g}|j||j j
�dS(Ns_acme-challenge.(tauthtperformtachallRtcalltadd_txt_recordtDOMAINtANYtassertEqualtmock_clientt
mock_calls(tselftexpected((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyttest_performs"cCs^t|j_|jj|jg�tjjtdttj �g}|j
||jj�dS(Ns_acme-challenge.(
tTrueRt_attempt_cleanuptcleanupR RR
tdel_txt_recordRR
RRR(RR((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyttest_cleanups"(t__name__t
__module__RR(((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyRs tBaseLexiconClientTestcBs�eZed�ZeZed�Zed�ZdZ e de
ZdZd�Z
d�Zd�Zd �Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�ZRS(sNo
domain founds400 Client Error: ...s500 Surprise! Error:
...s_acme-challenget.tbarcCsH|jjt|j|j�|jjjddd|jd|j�dS(NttypetTXTtnametcontent(tclientRRtrecord_nametrecord_contentt
provider_mockt
create_recordtassert_called_with(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyttest_add_txt_record/s cCs`|jdg|jj_|jjt|j|j�|jj j
ddd|jd|j�dS(NtRRR
R!(tDOMAIN_NOT_FOUNDR%tauthenticatetside_effectR"RRR#R$R&R'(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt,test_add_txt_record_try_twice_to_find_domain6s
cCsM|j|j|jg|jj_|jtj|jjt |j
|j�dS(N(R*R%R+R,tassertRaisesRtPluginErrorR"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt'test_add_txt_record_fail_to_find_domain?s cCs>|j|jj_|jtj|jjt |j
|j�dS(N(tLOGIN_ERRORR%R+R,R.RR/R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt(test_add_txt_record_fail_to_authenticateHs cCs>|j|jj_|jtj|jjt |j
|j�dS(N(tUNKNOWN_LOGIN_ERRORR%R+R,R.RR/R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt;test_add_txt_record_fail_to_authenticate_with_unknown_errorOs cCs>|j|jj_|jtj|jjt |j
|j�dS(N(t
GENERIC_ERRORR%R+R,R.RR/R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt(test_add_txt_record_error_finding_domainVs cCs>|j|jj_|jtj|jjt |j
|j�dS(N(R5R%R&R,R.RR/R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt'test_add_txt_record_error_adding_record]s cCsH|jjt|j|j�|jjjddd|jd|j�dS(NRRR
R!(R"RRR#R$R%t
delete_recordR'(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyttest_del_txt_recordds cCsA|j|j|jg|jj_|jjt|j|j�dS(N( R*R%R+R,R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt'test_del_txt_record_fail_to_find_domainkscCs2|j|jj_|jjt|j|j�dS(N( R1R%R+R,R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt(test_del_txt_record_fail_to_authenticaterscCs2|j|jj_|jjt|j|j�dS(N( R3R%R+R,R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt;test_del_txt_record_fail_to_authenticate_with_unknown_errorwscCs2|j|jj_|jjt|j|j�dS(N( R5R%R+R,R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt(test_del_txt_record_error_finding_domain|scCs2|j|jj_|jjt|j|j�dS(N( R5R%R8R,R"RRR#R$(R((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt)test_del_txt_record_error_deleting_record�s(RRt ExceptionR*RR5RR1R3t
record_prefixRR#R$R(R-R0R2R4R6R7R9R:R;R<R=R>(((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyR%s( (t__doc__tjosepytjoseRtImportErrortunittesttrequests.exceptionsRRtcertbotRtcertbot.pluginsRt
certbot.testsRt test_utilRtJWKRSAtloadtload_vectortKEYtBaseAuthenticatorTestRtobjectR(((sK/usr/lib/python2.7/site-packages/certbot/plugins/dns_test_common_lexicon.pyt<module>s