-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyc

ó
†+Mc@sšdZddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZdefd„ƒYZ
d	efd
„ƒYZdS(sATests for selection of the right Launchpad service by environmentiÿÿÿÿN(terrors(tInvalidLaunchpadInstancetLaunchpadServicetNotLaunchpadBranch(tFakeResolveFactory(tTestCasetLaunchpadServiceTestscBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„ZRS(
s3Test that the correct Launchpad instance is chosen.cCs'tt|ƒjƒ|jddƒdS(NtBZR_LP_XMLRPC_URL(tsuperRtsetUptoverrideEnvtNone(tself((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyR	 scCs tƒ}|jd|jƒdS(Ns$https://xmlrpc.launchpad.net/bazaar/(RtassertEqualtservice_url(Rtservice((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_default_service%s		cCsAdt_z tƒ}|jd|jƒWdtjdt_XdS(Nshttp://example.com/t
production(RtDEFAULT_SERVICE_URLR
RtLAUNCHPAD_INSTANCE(RR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_alter_default_service_url*s			cCs&tddƒ}|jd|jƒdS(Ntlp_instancetstagings,https://xmlrpc.staging.launchpad.net/bazaar/(RR
R(RR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_staging_service4s	cCs&tddƒ}|jd|jƒdS(NRtdevs$https://xmlrpc.launchpad.dev/bazaar/(RR
R(RR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_dev_service9s	cCs&tddƒ}|jd|jƒdS(NRtdemos)https://xmlrpc.demo.launchpad.net/bazaar/(RR
R(RR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_demo_service>s	cCs2|jttddƒ}|jdt|ƒƒdS(NRtfubars(fubar is not a valid Launchpad instance.(tassertRaisesRRR
tstr(Rterror((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_unknown_serviceCs
			cCs-dtjd<tƒ}|jd|jƒdS(Nshttp://example.com/R(tostenvironRR
R(RR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyt"test_environment_overrides_defaultJs
		cCs3dtjd<tddƒ}|jd|jƒdS(Nshttp://example.com/RRR(R!R"RR
R(RR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyt,test_environment_overrides_specified_servicePs
	(t__name__t
__module__t__doc__R	RRRRRR R#R$(((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyRs			
					tTestURLInferencecBszeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„ZRS(
s;Test the way we infer Launchpad web pages from branch URLs.cCs,tƒ}|jdƒ}|jd|ƒdS(Ns+bzr+ssh://bazaar.launchpad.net/~foo/bar/bazs'https://code.launchpad.net/~foo/bar/baz(Rtget_web_url_from_branch_urlR
(RRtweb_url((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_default_bzr_ssh_urlZs
		cCs2tddƒ}|jdƒ}|jd|ƒdS(NRRs+bzr+ssh://bazaar.launchpad.net/~foo/bar/bazs'https://code.launchpad.net/~foo/bar/baz(RR)R
(RRR*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_product_bzr_ssh_urlas
	cCs2tddƒ}|jdƒ}|jd|ƒdS(NRRs(sftp://bazaar.launchpad.net/~foo/bar/bazs'https://code.launchpad.net/~foo/bar/baz(RR)R
(RRR*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_sftp_branch_urlhs
	cCs2tddƒ}|jdƒ}|jd|ƒdS(NRRs3bzr+ssh://bazaar.staging.launchpad.net/~foo/bar/bazs'https://code.launchpad.net/~foo/bar/baz(RR)R
(RRR*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_staging_branch_urlos
	cCs;tƒ}|jt|jdƒ}|jdt|ƒƒdS(Ns"bzr+ssh://example.com/~foo/bar/bazsBbzr+ssh://example.com/~foo/bar/baz is not registered on Launchpad.(RRRR)R
R(RRR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_non_launchpad_urlvs			cCs#tƒ}|jt|jdƒdS(Ns$bzr+ssh://launchpad.net/~foo/bar/baz(RRRR)(RR((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_dodgy_launchpad_urls		cCsStddƒ}t|dtddgƒƒ}|jd|ƒ}|jd|ƒdS(NRRs~foo/bar/bazturlss(http://bazaar.launchpad.net/~foo/bar/bazslp:~foo/bar/bazs'https://code.launchpad.net/~foo/bar/baz(RRtdictR)R
(RRtfactoryR*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_lp_branch_url…scCsMtƒ}t|dtddgƒƒ}|jd|ƒ}|jd|ƒdS(NtfooR1s(http://bazaar.launchpad.net/~foo/bar/bazslp:foos'https://code.launchpad.net/~foo/bar/baz(RRR2R)R
(RRR3R*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_lp_branch_shortcuts	cCsMtƒ}t|ddƒ}d„}||_|jtj|jd|ƒdS(NR5cSstjddƒ‚dS(Ni*ssomething went wrong(t	xmlrpclibtFault(R((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pytsubmit›sslp:foo(RRRR9RRt
InvalidURLR)(RRR3R9((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_lp_branch_fault˜s			cCs2tddƒ}|jdƒ}|jd|ƒdS(NRRs+bzr+ssh://bazaar.launchpad.net/~foo/bar/bazs/https://code.staging.launchpad.net/~foo/bar/baz(RR)R
(RRR*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_staging_url¢s
	cCs2tddƒ}|jdƒ}|jd|ƒdS(NRRs+bzr+ssh://bazaar.launchpad.net/~foo/bar/bazs'https://code.launchpad.dev/~foo/bar/baz(RR)R
(RRR*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyttest_dev_url©s
	cCs2tddƒ}|jdƒ}|jd|ƒdS(NRRs+bzr+ssh://bazaar.launchpad.net/~foo/bar/bazs,https://code.demo.launchpad.net/~foo/bar/baz(RR)R
(RRR*((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyt
test_demo_url°s
	(R%R&R'R+R,R-R.R/R0R4R6R;R<R=R>(((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyR(Ws								
			
		(R'R!R7tbzrlibRt(bzrlib.plugins.launchpad.lp_registrationRRRt*bzrlib.plugins.launchpad.test_lp_directoryRtbzrlib.testsRRR((((sL/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/test_lp_service.pyt<module>s:

Copyright © 2017 || Recoded By Mr.Bumblebee