ó ‰P[c @s>dZddlZddlZddlZddlZddlZddlZddlmZy\ddl m Z m Z ddl m Z ddlmZmZmZmZddlmZWn:ek röZejjdeeƒƒejd ƒnXddlZdd lmZddlZejj d ƒr:d Z!n$ej"j#ejj d dƒdƒZ!ej$de!ƒj%Z%e!ej&d ApportVersion | | | | ... | | | +----------------------------------------------------+ | | | | [ Cancel ] [ Send ] | +-------------------------------------------------------------------+ is&Send problem report to the developers?tSendN(R)R%R1RR@RRIRARBRJR7RKRRLRMRNRORCRRRQRPRSRTRURVt cancel_buttonttreeview(R4((s*/usr/share/apport/testsuite/test_ui_kde.pyttest_apport_bug_package_layout0s ) %cCsÖd|jjd(tcheck_progresstcontR4(s*/usr/share/apport/testsuite/test_ui_kde.pyRxys !csˆjjdk ˆ_dS(N(R%tprogressR)tvisible_progress(R>(R4(s*/usr/share/apport/testsuite/test_ui_kde.pyRwsièiRGRZRs /bin/bashRXsbash tlibct Dependenciest StacktraceiN(R)RzRR@R%t run_crashR1RJR*t latest_idtdownloadRBRPt startswithRut call_count(R4R>R((RwRxR4s*/usr/share/apport/testsuite/test_ui_kde.pyttest_1_crash_nodetailsss cs2dˆ_‡‡‡fd†‰‡‡‡fd†‰‡fd†‰tjdˆƒˆjjˆjjƒˆjˆjjj ƒdƒˆjjj dƒ}ˆj|ddƒˆj|dd ƒˆj ˆjƒˆj |d j d ƒƒˆj d |d kƒˆj d|kƒˆjˆjjjdƒdS(s!Crash report with showing detailscs\ˆjjrHˆjjjjƒrHˆjjjjƒtjdˆƒdStjdˆƒdS(NièiÈ(R%R7t show_detailsRRRvRR@(R>(RxR4R„(s*/usr/share/apport/testsuite/test_ui_kde.pyR„žs !csšˆjjjtdƒ}|jƒdkr>tjdˆƒdSˆjjr†ˆjjjjƒr†ˆjjjj ƒtjdˆƒdStjdˆƒdS(NRTiiÈ( R%R7t findChildRttopLevelItemCountRR@RURRRv(R>RT(RwRxR4(s*/usr/share/apport/testsuite/test_ui_kde.pyRx§s!csˆjjdk ˆ_dS(N(R%RyR)Rz(R>(R4(s*/usr/share/apport/testsuite/test_ui_kde.pyRwµsiÈiRGRZRs /bin/bashRXsbash R{R|R}iN(R)RzRR@R%R~R1RJR*RR€RCRPRRuR‚(R4R>R((RwRxR4R„s*/usr/share/apport/testsuite/test_ui_kde.pyttest_1_crash_details˜s  cs-dˆ_‡‡‡fd†‰‡fd†‰tjdˆƒdgˆjjjd<ˆjjˆjjƒˆj ˆjjj ƒdƒˆj ˆjj j dƒˆj ˆjtƒˆjj}ˆj |dd ƒˆj |d d ƒˆj|d jd ƒƒˆjd|dkƒˆjd|kƒdS(s(Crash report with non-accepting crash DBcs\ˆjjrHˆjjjjƒrHˆjjjjƒtjdˆƒdStjdˆƒdS(NiÈiè(R%R7RURRRvRR@(R>(RwRxR4(s*/usr/share/apport/testsuite/test_ui_kde.pyRxÒs !csˆjjdk ˆ_dS(N(R%RyR)Rz(R>(R4(s*/usr/share/apport/testsuite/test_ui_kde.pyRwÚsiètbugt problem_typesiÿÿÿÿiRGRZRs /bin/bashRXsbash R{R|R}N(R)RzRR@R%R*toptionsR~R1RJRRuR‚tassertNotEqualRBR,RPR(R4R>R((RwRxR4s*/usr/share/apport/testsuite/test_ui_kde.pyttest_1_crash_noacceptÌs  cs¼d ˆj_dˆjj_‡‡fd†‰tjdˆƒˆjjƒˆjˆjj ddƒˆjˆjj ddƒˆj ˆjj dj dƒƒˆj ˆjj d d ƒd S( s Bug report for installed packagetbashcsLˆjjr8ˆjjjjƒr8ˆjjjjƒdStjdˆƒdS(Niè(R%R7RnRRRvRR@(R>(R?R4(s*/usr/share/apport/testsuite/test_ui_kde.pyR?ös!ièRGtBugt SourcePackageRXsbash R|R N( R)R%R1RŠtpackageRR@trun_report_bugRJR,RPRR‹(R4((R?R4s*/usr/share/apport/testsuite/test_ui_kde.pyt!test_bug_report_installed_packageðs   cs»tjjƒ}dˆj_|ˆjj_‡‡fd†‰tj dˆƒˆjj ƒˆj ˆjj ddƒˆj ˆjj dtjj |ƒƒˆj ˆjj dd|ƒdS( s"Bug report for uninstalled packagecsLˆjjr8ˆjjjjƒr8ˆjjjjƒdStjdˆƒdS(Niè(R%R7RnRRRvRR@(R>(R?R4(s*/usr/share/apport/testsuite/test_ui_kde.pyR? s!ièRGRŽRRXs%s (not installed)N(Rt packagingtget_uninstalled_packageR)R%R1RŠRRR@R‘RJR,t get_source(R4tpkg((R?R4s*/usr/share/apport/testsuite/test_ui_kde.pyt#test_bug_report_uninstalled_packages  csd ˆj_‡‡fd†‰ˆjjjiƒ}ˆj|dƒdˆjj_dˆjj_t j dˆƒˆjj ƒˆjˆjjj ƒdƒˆjjj dƒ}ˆj|djdƒƒˆjd|dkƒˆjd |kƒˆjˆjjjdƒd S( sUpdating an existing reportcsLˆjjr8ˆjjjjƒr8ˆjjjjƒdStjdˆƒdS(NiÈ(R%R7RURRRvRR@(R>(RxR4(s*/usr/share/apport/testsuite/test_ui_kde.pyRx"s!iRiÈRXsbash R{R|RN(R)R%R1R*tuploadRJRŠt update_reportRRR@trun_update_reportRR€RPRRuR‚(R4R>tidR((RxR4s*/usr/share/apport/testsuite/test_ui_kde.pyttest_1_update_reports  csÄdˆj_‡‡fd†‰tjjƒ}tjj|ƒ}ˆj||dƒˆjtjj|ƒdd|ƒˆj t tjj|ƒt t j jˆjd|ƒdƒ}|jdƒWdQXˆjjjiƒ}ˆj|d ƒd ˆjj_|ˆjj_tjd ˆƒˆjjƒˆjˆjjjƒd ƒˆjjjd ƒ}ˆjd |kƒˆjd |kƒˆjd |kƒˆj|ddƒˆjˆjjjd ƒdS(s]Updating an existing report on a source package which does not have a binary of the same namecsLˆjjr8ˆjjjjƒr8ˆjjjjƒdStjdˆƒdS(NiÈ(R%R7RURRRvRR@(R>(RxR4(s*/usr/share/apport/testsuite/test_ui_kde.pyRxDs!sIthis test assumes that the kernel binary package != kernel source packageR s@this test assumes that the kernel binary package %s is installeds source_%s.pytws0def add_info(r, ui): r["MachineType"]="Laptop" NiiÈt ProcEnvironRtUnamet MachineTypetLaptop(R)R%R1RR“tget_kernel_packageR•R‹t get_versiont assertRaisest ValueErrorR2R"R/R0R+R3R*R˜RJRŠR™RRR@RšRR€RPRuR‚(R4R>t kernel_pkgt kernel_srcR5R›R((RxR4s*/usr/share/apport/testsuite/test_ui_kde.pyt,test_1_update_report_different_binary_source>s0   ( cCs_tjdtjƒ|jjtƒ|j|jjj j ƒƒ|j|jjj j ƒƒdS(Ni( RR@RRIR%RAtFalseRCR7RQRRRS(R4((s*/usr/share/apport/testsuite/test_ui_kde.pyt%test_administrator_disabled_reportingqs(t__name__t __module__t classmethodRR6R<RERWRYR\RfRjRkRlRpRtRtobjectR$RƒR‡RŒR’R—RœR¨Rª(((s*/usr/share/apport/testsuite/test_ui_kde.pyR *s*    ' * " "  &%4$  "3Rs Apport KDEs1.0s#KDE 4 frontend tests for the apports2012 Canonical Ltd.s/https://wiki.ubuntu.com/AutomatedProblemReportsskubuntu-devel@lists.ubuntu.com(8t__doc__timptunittestRtsysR"R:tmockRt PyQt4.QtCoreRRt PyQt4.QtGuiRtPyKDE4.kdecoreRRRRt PyKDE4.kdeuiRt ImportErrortetstderrR3RctexitRR ROtapport.crashdb_impl.memoryR#tgettapport_kde_pathR/R0t load_sourceR$targvtTestCaseR tappNametcatalogt programNametversiont descriptiont License_GPLtlicenset copyrightRNthomePagetbugEmailt aboutDatatinitR%tmain(((s*/usr/share/apport/testsuite/test_ui_kde.pytsR      "   $ ÿÿO