Current File : //opt/imh-python/lib/python2.7/test/test_netrc.pyc
�
��Wc@s�ddlZddlZddlZddlZddlZddlmZejZdej	fd��YZ
d�Zedkr�e�ndS(i����N(ttest_supportt
NetrcTestCasecBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zejejdkd�d��ZRS(cCsvtj|�}d}tjdkr1|d7}ntt|��}|j|�WdQX|jtj	t�t
j
t�S(Ntwtcygwintt(ttextwraptdedenttsystplatformtopent
temp_filenametwritet
addCleanuptostunlinktnetrc(tselft	test_datatmodetfp((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pytmake_nrcs
cCsA|jd�}|j|jdd	�|j|jdd
�dS(Ns�            machine host1.domain.com login log1 password pass1 account acct1
            default login log2 password pass2
            shost1.domain.comtlog1tacct1tpass1tdefaulttlog2tpass2(RRR(RNR(RtassertEqualthoststNone(Rtnrc((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyttest_defaults
	cCs@|jd�}|j|jiddgd6ddgd6�dS(Ns�            macdef macro1
            line1
            line2

            macdef macro2
            line3
            line4
            sline1
sline2
tmacro1sline3
sline4
tmacro2(RRtmacros(RR((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyttest_macross	cCs3|j|�}|j|jddd|f�dS(Nshost.domain.comtlogtacct(RRR(RRtpasswd((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt_test_passwords(scCs|jdd�dS(NsV            machine host.domain.com login log password #pass account acct
            s#pass(R'(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyttest_password_with_leading_hash,scCs|jdd�dS(NsV            machine host.domain.com login log password pass# account acct
            spass#(R'(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt test_password_with_trailing_hash1scCs|jdd�dS(NsV            machine host.domain.com login log password pa#ss account acct
            spa#ss(R'(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt test_password_with_internal_hash6stpasscCsJ|j|�}|j|jddd|f�|j|jdd�dS(Nsfoo.domain.comtbarsbar.domain.comtfooR+(R-NR+(RRRR(RRR&((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt
_test_comment;s cCs|jd�dS(Ns�            # comment
            machine foo.domain.com login bar password pass
            machine bar.domain.com login foo password pass
            (R.(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt test_comment_before_machine_line@scCs|jd�dS(Ns�            #comment
            machine foo.domain.com login bar password pass
            machine bar.domain.com login foo password pass
            (R.(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt)test_comment_before_machine_line_no_spaceGscCs|jd�dS(Ns�            #
            machine foo.domain.com login bar password pass
            machine bar.domain.com login foo password pass
            (R.(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt*test_comment_before_machine_line_hash_onlyNscCs|jd�dS(Ns�            machine foo.domain.com login bar password pass # comment
            machine bar.domain.com login foo password pass
            (R.(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt#test_comment_at_end_of_machine_lineUscCs|jd�dS(Ns�            machine foo.domain.com login bar password pass #comment
            machine bar.domain.com login foo password pass
            (R.(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt,test_comment_at_end_of_machine_line_no_space[scCs|jdd�dS(Ns�            machine foo.domain.com login bar password #pass #comment
            machine bar.domain.com login foo password pass
            s#pass(R.(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt1test_comment_at_end_of_machine_line_pass_has_hashastposixsPOSIX only testc
Cs�tj}tj|�|jtj|�tjj|d�}t|d��}|j	d�WdQXtj
��p}|jd|�tj|d�t
j
�}|j|jdd
�tj|d	�|jt
jt
j
�WdQXdS(Ns.netrctwts                machine foo.domain.com login bar password pass
                default login foo password pass
                tHOMEi�sfoo.domain.comR,R+i�(sbarNspass(RtTESTFNR
tmkdirRtrmtreetpathtjoinR	RtEnvironmentVarGuardtsettchmodRRRRtassertRaisestNetrcParseError(RtdtfntftenvironR((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt
test_securityhs	

(t__name__t
__module__RRR#R'R(R)R*R.R/R0R1R2R3R4tunittestt
skipUnlessR
tnameRF(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyRs	
			
										cCstjt�dS(N(Rtrun_unittestR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt	test_main~st__main__(
RR
RIRRttestRR8R
tTestCaseRRMRG(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_netrc.pyt<module>s<	x