403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/keyring/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyc
ó
F+ÞOc@sdZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
ZdZdZdZ
dejjfd„ƒYZdefd	„ƒYZd
ejfd„ƒYZdejfd
„ƒYZd„ZedkrejddƒndS(s3
test_core.py

Created by Kang Zhang on 2009-08-09
iÿÿÿÿNsThis is passwordsThis is password2s
keyringrc.cfgtTestKeyringcBs)eZdZd„Zd„Zd„ZRS(sA faked keyring for test.
    cCsdS(Ni((tself((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyt	supportedscCstS(N(t
PASSWORD_TEXT(Rtservicetusername((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pytget_passwordscCsdS(Ni((RRRtpassword((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pytset_passwords(t__name__t
__module__t__doc__RRR(((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyRs		tTestKeyring2cBseZdZd„ZRS(s$Another faked keyring for test.
    cCstS(N(tPASSWORD_TEXT_2(RRR((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyR$s(R	R
RR(((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyR!stCoreTestCasecBs,eZd„Zd„Zd„Zd„ZRS(cCs9tjjdddƒ|jtjjddƒdƒdS(s0Test the basic function of the keyring.
        ttesttusertpasstestN(tkeyringtcoreRtassertEqualR(R((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyttest_set_get_password(scCsLtjjtƒƒtjjdddƒ|jtjjddƒtƒdS(s5Test the function of set keyring in runtime.
        RRRN(RRtset_keyringRRRRR(R((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyttest_set_keyring_in_runtime.scCsžttdƒ}|jddtjjtjjtƒƒdgƒ|jƒt	j
jƒt	j
jdddƒ|j
t	j
jddƒtƒtjtƒdS(	s1Test setting the keyring by config file.
        tws
[backend]
skeyring-path= %s
s'default-keyring=test_core.TestKeyring2
RRRN(topent	KEYRINGRCt
writelinestostpathtdirnametabspatht__file__tcloseRRtinit_backendRRRR
tremove(Rtconfig_file((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyttest_set_keyring_in_config7s	


cCsStjƒ}tjƒ}tj|ƒtjjtjjdƒdƒ}tjj|ƒrutj	||dƒt
}nt}tj
jƒtjj|dƒ}t|dƒ}|jdƒ|jƒtj
jƒtjj|dƒ}t|dƒ}|jdƒ|jƒtj
jƒtj|ƒtj|ƒ|rOtj	|d|ƒndS(Nt~s
keyringrc.cfgs.oldRs	[keyring]s	[backend](ttempfiletmkdtempRtgetcwdtchdirRtjoint
expandusertexiststrenametTruetFalseRRtload_configRtwriteR!tshutiltrmtree(Rttempdirtold_locationtpersonal_cfgtpersonal_renamedtcfgtf((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyttest_load_configMs.
!	








(R	R
RRR%R;(((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyR's				tLocationTestCasecBs‡eZejjdƒZejjejj	j
ƒdƒZej
ejjeƒdƒej
ejjeƒdeƒƒd„ƒƒZRS(s~/keyringrc.cfgs
keyringrc.cfgs7Location test requires non-existence of ~/keyringrc.cfgs8Location test requires non-existence of %(new_location)scCsKt|jdƒ}|jdƒWdQXtjddg}tj|dtjdtjƒ}|jƒ\}}|j	dksˆt
|ƒ‚zktjj
|jƒs§t
‚tjj
|jƒsÂt
‚t|jƒ}d	|jƒksìt
‚WdQXWdtjj
|jƒrtj|jƒntjj
|jƒrFtj|jƒnXdS(
s¤
        When starting the keyring module and ~/keyringrc.cfg exists, it
        should be moved and the user should be informed that it was
        moved.
        Rs[test config]
Ns-csPimport sys; sys.path.remove(""); import keyring.core; keyring.core.load_config()tstderrtstdoutistest config(Rtlegacy_locationR2tsyst
executablet
subprocesstPopentPIPEtcommunicatet
returncodetAssertionErrorRRR-tnew_locationtreadR#(RR:tcmdtprocR>R=((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyttest_moves_compatss!"(R	R
RRR,R?R+Rtutiltplatformt	data_rootRHtunittesttskipIfR-tvarsRL(((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyR<ns	cCs<tjƒ}|jtjtƒƒ|jtjtƒƒ|S(N(RPt	TestSuitetaddTestt	makeSuiteRR<(tsuite((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyt
test_suite•st__main__tdefaultTestRW(RRPRR@R'R3RBtkeyring.backendRtkeyring.coretkeyring.util.platformRR
RtbackendtKeyringBackendRRtTestCaseRR<RWR	tmain(((s;/usr/lib/python2.7/dist-packages/keyring/tests/test_core.pyt<module>s&G'	

Youez - 2016 - github.com/yon3zu
LinuXploit