PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  ]c@sLddlmZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z ddl m Z ddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&m'Z'ddl(m)Z)m*Z*m+Z+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2m3Z3ddl4m5Z5ddl6m7Z7m8Z8ddl9m:Z:m;Z;ddl<m=Z=m>Z>m?Z?m@Z@mAZAddlBmCZCddlDmEZEddlFmGZGddlHmIZIddlJmKZKmLZLmMZMmNZNmOZOddlPmQZQdd lRmSZSd!d"d#d$d%fZTd&ZUd'ZVd(e=fd)YZWd*eXfd+YZYd,eYfd-YZZd.eXfd/YZ[d0ej\fd1YZ]d2e]fd3YZ^d4Z_d5e^fd6YZ\d7eXfd8YZ`d9Zad:Zbd;Zcd<Zdd=e&fd>YZed?efd@YZfdAeffdBYZgdCeffdDYZhdEejifdFYZjdGe^fdHYZkdIeXfdJYZldS(Ki(tunicode_literalsN(tCounter(tcontextmanager(tcopy(twraps(t safe_repr(tapps(tsettings(tmail(tValidationError(tlocks(t WSGIHandlert get_path_info(t call_command(tno_style(temit_post_migrate_signal(tWSGIRequestHandlert WSGIServer(tDEFAULT_DB_ALIASt connectiont connectionst transaction(t CharField(t QueryDict(tsplit_domain_portt validate_host(tClient(tHTMLParseErrort parse_html(tsetting_changedttemplate_rendered(tCaptureQueriesContextt ContextListt compare_xmltmodify_settingstoverride_settings(tsix(t classproperty(tRemovedInDjango20Warning(t force_text(tunquoteturljointurlparseturlsplitt urlunsplit(t url2pathname(tserveuTestCaseuTransactionTestCaseuSimpleTestCaseuskipIfDBFeatureuskipUnlessDBFeaturecCs4|dkrg}nt|ts0|g}n|S(ue Puts value into a list if it's not already one. Returns an empty list if value is None. N(tNonet isinstancetlist(tvalue((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytto_list3s    cCsSyt|}Wn<tk rN}d||f}|j|j||nX|S(Nu%s %s(RRtfailt_formatMessage(tselfthtmltuser_msgtmsgtdomtet standardMsg((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassert_and_parse_html?s t_AssertNumQueriesContextcBseZdZdZRS(cCs,||_||_tt|j|dS(N(t test_casetnumtsuperR>t__init__(R6R?R@R((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRBIs  c Cs{tt|j||||dk r,dSt|}|jj||jd||jdjd|j DfdS(Nu:%d queries executed, %d expected Captured queries were: %su css|]}|dVqdS(usqlN((t.0tquery((s9/usr/lib/python2.7/site-packages/django/test/testcases.pys Xs( RAR>t__exit__R/tlenR?t assertEqualR@tjointcaptured_queries(R6texc_typet exc_valuet tracebacktexecuted((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRENs     (t__name__t __module__RBRE(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR>Hs t_AssertTemplateUsedContextcBs>eZdZdZdZdZdZdZRS(cCs4||_||_g|_g|_t|_dS(N(R?t template_nametrendered_templatestrendered_template_namesR tcontext(R6R?RQ((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRB_s     cKs=|jj||jj|j|jjt|dS(N(RRtappendRStnameRTR(R6tsendertsignalttemplateRTtkwargs((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyton_template_renderfscCs|j|jkS(N(RQRS(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyttestkscCs d|jS(Nu%s was not rendered.(RQ(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytmessagenscCstj|j|S(N(RtconnectR[(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt __enter__qscCstj|j|dk r dS|js|j}t|jdkrZ|d7}n|ddj|j 7}|j j |ndS(Niu No template was rendered.u& Following templates were rendered: %su, ( Rt disconnectR[R/R\R]RFRRRHRSR?R4(R6RJRKRLR]((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyREus    (RNRORBR[R\R]R_RE(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRP^s      t_AssertTemplateNotUsedContextcBseZdZdZRS(cCs|j|jkS(N(RQRS(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR\scCs d|jS(Nu%s was rendered.(RQ(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR]s(RNROR\R](((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRas t_CursorFailurecBseZdZdZRS(cCs||_||_dS(N(tcls_nametwrapped(R6RcRd((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRBs cCstd|jdS(NuDatabase queries aren't allowed in SimpleTestCase. Either use TestCase or TransactionTestCase to ensure proper test isolation or set %s.allow_database_queries to True to silence this failure.(tAssertionErrorRc(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt__call__s(RNRORBRf(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRbs tSimpleTestCasecBseZeZdZdZeZe dZ e dZ ddZ dZ dZdZdZdddd ed Zd Zddd ed Zdd ed Zd dZd dZdZddd ddZddd dZedZdZddd dZddZddZ dd dZ!ddZ"ddZ#ddZ$ddZ%e&j're(j)j*Z+e(j)j,Z-e(j)j.Z/e(j)j0Z1nRS(cCstt|j|jr>t|j|_|jjn|jrit|j|_ |j jn|j sxKt D]@}t |}t |j |j|_t |j |j|_qyWndS(N(RARgt setUpClasst_overridden_settingsR#t_cls_overridden_contexttenablet_modified_settingsR"t_cls_modified_contexttallow_database_queriesRRbRNtcursortchunked_cursor(tclstaliasR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRhs     cCs|jsEx9tD].}t|}|jj|_|jj|_qWnt|drq|jjt|dnt|dr|j jt|dnt t |j dS(Nu_cls_modified_contextu_cls_overridden_context( RnRRoRdRpthasattrRmtdisabletdelattrRjRARgt tearDownClass(RqRrR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRvs     cCst||j}t|jdtp6t|dt}|s{y|jWq{tk rw|j|tjdSXnt t |j ||sy|j Wqtk r|j|tjdSXndS(u Wrapper around default __call__ method to perform common Django test set up. This means that user-defined Test Cases aren't required to include a call to super().setUp(). u__unittest_skip__N( tgetattrt_testMethodNamet __class__tFalset _pre_setupt ExceptiontaddErrortsystexc_infoRARgRft_post_teardown(R6tresultt testMethodtskipped((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRfs   cCs|j|_gt_dS(uPerforms any pre-test setup. This includes: * Creating a test client. * Clearing the mail test outbox. N(t client_classtclientRtoutbox(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR{scCsdS(uPerform any post-test things.N((R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRscKs t|S(u A context manager that temporarily sets a setting and reverts to the original value when exiting the context. (R#(R6RZ((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRscKs t|S(u A context manager that temporarily applies changes a list setting and reverts back to the original value when exiting the context. (R"(R6RZ((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR"si.iuc Cs|dk r%tjdtddn|r8|d7}nt|dr|jt|jdk|d|j|f|j |jdd||d |jdd|f|jd \}}t |\} } } } } |j |j||d |j|fn'|j |j||d|j|f|j }t |\} } } } } | j d st |jd |}t |jd | } n|r-t| \}}|rt|tj rtd||fn|jj| t| d| dk}|j |j||d| |j|fn||krt |\}}}}}tdd|||f}||krtjdtdd|}qn|j |||d||fdS(u8Asserts that a response redirected to a specific URL, and that the redirect URL can be loaded. Note that assertRedirects won't work for external links since it uses TestClient to do a request (use fetch_redirect_response=False to check such links without fetching them). uEThe host argument is deprecated and no longer used by assertRedirectst stackleveliu: uredirect_chainiuHResponse didn't redirect as expected: Response code was %d (expected %d)iuPInitial response didn't redirect as expected: Response code was %d (expected %d)iuNResponse didn't redirect as expected: Final Response code was %d (expected %d)u/u PATH_INFOuThe test client is unable to fetch remote URLs (got %s). If the host is served by Django, add '%s' to ALLOWED_HOSTS. Otherwise, use assertRedirects(..., fetch_redirect_response=False).tsecureuhttpsuKCouldn't retrieve redirection page '%s': response code was %d (expected %d)uuassertRedirects had to strip the scheme and domain from the expected URL, as it was always added automatically to URLs before Django 1.9. Please update your expected URLs by removing the scheme and domain.u*Response redirected to '%s', expected '%s'N(R/twarningstwarnR&Rst assertTrueRFtredirect_chaint status_codeRGR+turlt startswithR)trequestRRRt ALLOWED_HOSTSt ValueErrorRtgetRR,(R6tresponset expected_urlRttarget_status_codethostt msg_prefixtfetch_redirect_responseRtschemetnetloctpathRDtfragmenttdomaintporttredirect_responsete_schemete_netlocte_pathte_queryt e_fragmentt relative_url((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertRedirectssh     '     c Cs;t|dr5t|jr5|j r5|jn|rH|d7}n|j|j||d|j|f|jrdj|j}n |j }t |t  s|rt |d|j }|j|j }d|}n t|}|rt||dd}t||dd}n|j|}|||fS( Nurenderu: u=Couldn't retrieve content: Response code was %d (expected %d)ttencodingu'%s'u%Response's content is not valid HTML:u"Second argument is not valid HTML:(Rstcallabletrendert is_renderedRGRt streamingRHtstreaming_contenttcontentR0tbytesR'tcharsettdecodetreprR=R/tcount( R6RttextRRR7Rt text_reprt real_count((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_assert_containsYs*(       c Csy|j|||||\}}}|dk rW|j|||d|||fn|j|dk|d|dS(uq Asserts that a response indicates that some content was retrieved successfully, (i.e., the HTTP status code was as expected), and that ``text`` occurs ``count`` times in the content of the response. If ``count`` is None, the count doesn't matter - the assertion is true if the text occurs at least once in the response. u2Found %d instances of %s in response (expected %d)iuCouldn't find %s in responseN(RR/RGR( R6RRRRRR7RR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertContainsxs cCsC|j|||||\}}}|j|d|d|dS(u Asserts that a response indicates that some content was retrieved successfully, (i.e., the HTTP status code was as expected), and that ``text`` doesn't occurs in the content of the response. iuResponse should not contain %sN(RRG(R6RRRRR7RR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertNotContainssc Cs|r|d7}nt|j}|s<|j|dnt|}t}x2t|D]$\}} || kryq[nt}x|D]} |rA|| |jkr| |j|} |j| | k|d|||| t| fq{|| |j kr |j|d|||fq{|j|d|||fq| |j } |j| | k|d||| | fqWq[W|s|j|d|ndS( ue Asserts that a form used to render the response has a specific field error. u: u8Response did not use any contexts to render the responseu]The field '%s' on form '%s' in context %d does not contain the error '%s' (actual errors: %s)u<The field '%s' on form '%s' in context %d contains no errorsu;The form '%s' in context %d does not contain the field '%s'uYThe form '%s' in context %d does not contain the non-field error '%s' (actual errors: %s)u1The form '%s' was not used to render the responseN( R3RTR4Rzt enumeratetTrueterrorsRRtfieldstnon_field_errors( R6RtformtfieldRRtcontextst found_formtiRTterrt field_errorsR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertFormErrorsB     ! c Cs|r|d7}nt|j}|s<|j|dnt|}t}x t|D]\} } || kryq[nt}x|D]} |d k re|| |j|jkr| |j|j|} |j | | k|d|||| | t | fqU|| |j|j krA|j|d|||| fqU|j|d||| |fq|d k r| |j|j } |j t| dk|d||| f|j | | k|d||| | t | fq| |j}|j t|dk|d || f|j | |k|d || | t |fqWq[W|s{|j|d |nd S( u^ Asserts that a formset used to render the response has a specific error. For field errors, specify the ``form_index`` and the ``field``. For non-field errors, specify the ``form_index`` and the ``field`` as None. For non-form errors, specify ``form_index`` as None and the ``field`` as None. u: u8Response did not use any contexts to render the responseuiThe field '%s' on formset '%s', form %d in context %d does not contain the error '%s' (actual errors: %s)uHThe field '%s' on formset '%s', form %d in context %d contains no errorsuGThe formset '%s', form %d in context %d does not contain the field '%s'iuNThe formset '%s', form %d in context %d does not contain any non-field errors.ueThe formset '%s', form %d in context %d does not contain the non-field error '%s' (actual errors: %s)uDThe formset '%s' in context %d does not contain any non-form errors.u[The formset '%s' in context %d does not contain the non-form error '%s' (actual errors: %s)u4The formset '%s' was not used to render the responseN(R3RTR4RzRRR/tformsRRRRRt assertFalseRFtnon_form_errors(R6Rtformsett form_indexRRRRt found_formsetRRTRRRR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertFormsetErrors^       $  ! #c Cs|dkr'|dkr'tdn|r:|d7}n|dk rq|dk rqt|d rqtdnt|d s|dkr|r|r|}d}n|d|fSg|jD]}|jdk r|j^q}d||fS(Nu7response and/or template_name argument must be providedu: u templatesusassertTemplateUsed() and assertTemplateNotUsed() are only usable on responses fetched using the Django test Client.(R/t TypeErrorRsRt templatesRV(R6RRQRttttemplate_names((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_assert_template_useds ( "  .c Cs|j|||\}}}|r1t||S|sK|j|dn|j||k|d|dj|f|dk r|j|j|||d|||j|fndS(u Asserts that the template with the provided name was used in rendering the response. Also usable as context manager. u(No templates used to render the responseuYTemplate '%s' was not a template used to render the response. Actual template(s) used: %su, uZTemplate '%s' was expected to be rendered %d time(s) but was actually rendered %d time(s).N(RRPR4RRHR/RGR(R6RRQRRtcontext_mgr_templateR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertTemplateUsed5s   cCsS|j|||\}}}|r1t||S|j||k|d|dS(u Asserts that the template with the provided name was NOT used in rendering the response. Also usable as context manager. u=Template '%s' was used unexpectedly in rendering the responseN(RRaR(R6RRQRRR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertTemplateNotUsedRs  ccs:|j| }|VWdQX|j|t|jdS(N(t assertRaisestassertIntstrt exception(R6texpected_exceptiontexpected_messagetcm((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_assert_raises_message_cmcs cOs|jdd}|r+tjdtn#t|rN|d}|d}n|j||}|dkrp|S||||WdQXdS(uh Asserts that expected_message is found in the the message of a raised exception. Args: expected_exception: Exception class expected to be raised. expected_message: expected error message string value. args: Function to be called and extra positional args. kwargs: Extra kwargs. u callable_objuYThe callable_obj kwarg is deprecated. Pass the callable as a positional argument instead.iiN(tpopR/RRR&RFR(R6RRtargsRZt callable_objR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertRaisesMessageis      cCs|dkrg}n|dkr*i}n|||}||t|dt}xL|jD]>\} } |j|j| | |j|j| | qaWx|jD]\} } |jt} |j| WdQX|j| jj | |jt} |j| WdQX|j| jj | qWt |j dg} xe|j D]Z}|jt} |j|WdQX|j| jj | |j|j||qVWt |tr|jidd6dd6|j||||ndS(uP Asserts that a form field behaves correctly with various inputs. Args: fieldclass: the class of the field to be tested. valid: a dictionary mapping valid inputs to their expected cleaned values. invalid: a dictionary mapping invalid inputs to one or more raised error messages. field_args: the args passed to instantiate the field field_kwargs: the kwargs passed to instantiate the field empty_value: the expected clean output for inputs in empty_values trequiredNurequirediu min_lengthiu max_length(R/tdictRztitemsRGtcleanRR RtmessagesR'terror_messagest empty_valuest issubclassRtupdatetassertIsInstance(R6t fieldclasstvalidtinvalidt field_argst field_kwargst empty_valueRtoptionaltinputtoutputRtcontext_managerterror_requiredR;((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertFieldOutputs2    cCst|||d}t|||d}||krdt|tt|tf}ddjtjtj|jtj|j}|j ||}|j |j ||ndS(u Asserts that two HTML snippets are semantically the same. Whitespace in most cases is ignored, and attribute ordering is not significant. The passed-in arguments must be valid HTML. u!First argument is not valid HTML:u"Second argument is not valid HTML:u%s != %su N( R=RRRHtdifflibtndiffR$t text_typet splitlinest_truncateMessageR4R5(R6thtml1thtml2R9tdom1tdom2R<tdiff((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertHTMLEquals cCsxt|||d}t|||d}||krtdt|tt|tf}|j|j||ndS(u?Asserts that two HTML snippets are not semantically equivalent.u!First argument is not valid HTML:u"Second argument is not valid HTML:u%s == %sN(R=RRR4R5(R6RRR9RRR<((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertHTMLNotEquals  cCst||dd}t||dd}|j|}|dk rl|j|||d|||fn|j|dk|d|dS(Nu!First argument is not valid HTML:u"Second argument is not valid HTML:u4Found %d instances of '%s' in response (expected %d)iuCouldn't find '%s' in response(R=R/RRGR(R6tneedlethaystackRRR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt assertInHTMLs cCsytj|}Wn"tk r7|jd|nXt|tjrytj|}Wqtk r|jd|qXn|j||d|dS(u Asserts that the JSON fragments raw and expected_data are equal. Usual JSON non-significant whitespace rules apply as the heavyweight is delegated to the json library. u$First argument is not valid JSON: %ru%Second argument is not valid JSON: %rR9N(tjsontloadsRR4R0R$t string_typesRG(R6trawt expected_dataR9tdata((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertJSONEquals  cCsytj|}Wn"tk r7|jd|nXt|tjrytj|}Wqtk r|jd|qXn|j||d|dS(u Asserts that the JSON fragments raw and expected_data are not equal. Usual JSON non-significant whitespace rules apply as the heavyweight is delegated to the json library. u$First argument is not valid JSON: %ru%Second argument is not valid JSON: %rR9N(RR RR4R0R$R tassertNotEqual(R6R R R9R ((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertJSONNotEquals  cCsyt||}Wn6tk rK}d|}|j|j||nX|sdt|tt|tf}ddjtjt j |j t j |j }|j ||}|j|j||ndS(u Asserts that two XML snippets are semantically the same. Whitespace in most cases is ignored, and attribute ordering is not significant. The passed-in arguments must be valid XML. u,First or second argument is not valid XML %su%s != %su N( R!R|R4R5RRRHRRR$RRR(R6txml1txml2R9RR;R<R((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertXMLEquals " cCsyt||}Wn6tk rK}d|}|j|j||nEX|rdt|tt|tf}|j|j||ndS(u Asserts that two XML snippets are not semantically equivalent. Whitespace in most cases is ignored, and attribute ordering is not significant. The passed-in arguments must be valid XML. u,First or second argument is not valid XML %su%s == %sN(R!R|R4R5RR(R6RRR9RR;R<((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertXMLNotEquals "N(2RNRORRR/RiRlRzRnt classmethodRhRvRfR{RRR"RRRRRRRRRRRRRRRRRRRRRR$tPY2tunittesttTestCasetassertItemsEqualtassertCountEqualtassertNotRegexpMatchestassertNotRegextassertRaisesRegexptassertRaisesRegextassertRegexpMatchest assertRegex(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRgsL      `  8 O  -          tTransactionTestCasecBseZeZd Zd ZeZeZ dZ e edZ dZ dZdZdZdZeed dZd dZRS( c Cstt|j|jd k rtj|jtjdt j j ddd|jdt x6|j dtD]}tddd td |qpWny|jWn[tk r|jd k rtjtjdt j j dddt jdtnnXd S( uePerforms any pre-test setup. This includes: * If the class has an 'available_apps' attribute, restricting the app registry to these applications, then firing post_migrate -- it must run with the correct set of applications for the test case. * If the class has a 'fixtures' attribute, installing these fixtures. RWtsettinguINSTALLED_APPSR2tentertinclude_mirrorst verbosityit interactivetdbN(RAR!R{tavailable_appsR/Rtset_available_appsRtsendRt_wrappedRyRt_databases_namesRzRt_fixture_setupR|tunset_available_appstINSTALLED_APPS(R6tdb_name((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR{Ds*          cCsPt|dtrEgtD](}|s;t|jdd r|^qStgSdS(Numulti_dbuTESTuMIRROR(RwRzRt settings_dictR(RqR$Rr((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR,ds &cCst|}|jjr|jjt|jj}|rtj d|/|j }x|D]}|j |qcWWdQXqndS(Ntusing( Rtfeaturestsupports_sequence_resettopstsequence_reset_by_name_sqlRt introspectiont sequence_listRtatomicRotexecute(R6R0tconntsql_listRotsql((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_reset_sequencesps     cCsx|jdtD]}|jr2|j|n|jrtt|dr|jdk rjt j nt|j j t|j |jdk rt j|jqn|jrtd|jidd6|d6qqWdS(NR$u_test_serialized_contentsuloaddataiu verbosityudatabase(R,Rztreset_sequencesR>tserialized_rollbackRsRR(R/RR.tcreationtdeserialize_db_from_stringt_test_serialized_contentsR)tfixturesR (R6R0((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR-{s     cCstS(N(R(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_should_reload_connectionssc CszQ|jtt|j|jrPx!tjD]}|jq9WnWd|jdk rt j t j dtjjdddtjdtnXdS(u"Performs any post-test things. This includes: * Flushing the contents of the database, to leave a clean slate. If the class has an 'available_apps' attribute, post_migrate isn't fired. * Force-closing the connection, so the next test gets a clean cursor. NRWR"uINSTALLED_APPSR2R#(t_fixture_teardownRAR!RRERtalltcloseR(R/RR.RR*RR+RyR/Rz(R6R;((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs    cCsx||jdtD]h}|jdk pA|joAtt|d}tddddtd|dtd |jdk d |qWdS( NR$u_test_serialized_contentsuflushR%iR&tdatabaseR?t allow_cascadetinhibit_post_migrate(R,RzR(R/R@RsRR (R6R0RK((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRFs  cCstjj||}|s=|jt|t|d|St|}t|dkrt|dr|j rt dn|jt||d|S(NR9iuordereduKTrying to compare non-ordered queryset against more than one ordered values( R$tmovestmapRGRR1RFRstorderedR(R6tqstvaluest transformRNR9R((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertQuerysetEquals" +cOs\|jdt}t|}t|||}|dkr>|S||||WdQXdS(Nuusing(RRRR>R/(R6R@tfuncRRZR2R;RT((s9/usr/lib/python2.7/site-packages/django/test/testcases.pytassertNumQueriess  N(RNRORzR?R/R(RDR@RRnR{RR,R>R-RERRFRRRRT(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR!.s      cCstdtjDS(u? Returns True if all connections support transactions. css|]}|jjVqdS(N(R3tsupports_transactions(RCR;((s9/usr/lib/python2.7/site-packages/django/test/testcases.pys s(RGR(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt connections_support_transactionss RcBs}eZdZedZedZedZedZedZdZ dZ dZ d Z RS( u Similar to TransactionTestCase, but uses `transaction.atomic()` to achieve test isolation. In most situations, TestCase should be preferred to TransactionTestCase as it allows faster execution. However, there are some situations where using TransactionTestCase might be necessary (e.g. testing some transactional behavior). On database backends with no transaction support, TestCase behaves as TransactionTestCase. cCsEi}x8|jD]*}tjd|||<||jqW|S(u:Helper method to open atomic blocks for multiple databasesR2(R,RR9R_(RqtatomicsR0((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_enter_atomicss cCsKxDt|jD]0}tjtd|||jdddqWdS(u9Rollback atomic blocks opened through the previous methodR2N(treversedR,Rt set_rollbackRRER/(RqRWR0((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_rollback_atomicsscCstt|jts dS|j|_|jrxp|jdtD]Y}y,t d|jidd6td6|d6WqKt k r|j |jqKXqKWny|j Wn$t k r|j |jnXdS(NR$uloaddataiu verbosityucommitudatabase( RARRhRVRXt cls_atomicsRDR,RzR R|R[t setUpTestData(RqR0((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRhs&    cCsTtr=|j|jx!tjD]}|jq&Wntt|jdS(N( RVR[R\RRGRHRARRv(RqR;((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRvs  cCsdS(u"Load initial data for the TestCaseN((Rq((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR]scCs tr tStt|jS(N(RVRzRARRE(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRE$s cCsOts&|jtt|jS|j s<td|j|_dS(Nu4reset_sequences cannot be used on TestCase instances( RVR]RARR-R?ReRXRW(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR-)s   cCsytstt|jSzEx>t|jD]*}|jt|r2t|jq2q2WWd|j |j XdS(N( RVRARRFRYR,t_should_check_constraintsRtcheck_constraintsR[RW(R6R0((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRF3s cCs |jjo|j o|jS(N(R3tcan_defer_constraint_checkstneeds_rollbackt is_usable(R6R((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR^=s ( RNROt__doc__RRXR[RhRvR]RER-RFR^(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs    tCheckConditioncBs,eZdZdZdZddZRS(u0Descriptor class for deferred condition checkingcGs ||_dS(N(t conditions(R6Re((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRBFscCs|j|j||ffS(N(RyRe(R6t conditiontreason((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt add_conditionIscCsZtd|jDrtSx6|jD]+\}}|r't|_||_tSq'WtS(Ncss!|]}t|dtVqdS(u__unittest_skip__N(RwRz(RCtbase((s9/usr/lib/python2.7/site-packages/django/test/testcases.pys Ns(tanyt __bases__RRet__unittest_skip__t__unittest_skip_why__Rz(R6tinstanceRqRfRg((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt__get__Ls   N(RNRORcRBRhR/Ro(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRdDs  csfd}|S(NcsttottjsKtfd}|}nc}jjd}t|tr|j |_ n$|t k rtf|_ n|S(Ncs(rtjn||S(N(RtSkipTest(RRZ(RfRgt test_func(s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt skip_wrapper]s u__unittest_skip__( R0ttypeRRRRt__dict__RRdRhRlR(RqRrt test_itemtskip(RfRg(Rqs9/usr/lib/python2.7/site-packages/django/test/testcases.pyt decoratorZs!  ((RfRgRw((RfRgs9/usr/lib/python2.7/site-packages/django/test/testcases.pyt _deferredSkipYscs#tfdddjS(uK Skip a test if a database has at least one of the named features. cstdDS(Ncss$|]}ttj|tVqdS(N(RwRR3Rz(RCtfeature((s9/usr/lib/python2.7/site-packages/django/test/testcases.pys vs(Rj((R3(s9/usr/lib/python2.7/site-packages/django/test/testcases.pytvsuDatabase has feature(s) %su, (RxRH(R3((R3s9/usr/lib/python2.7/site-packages/django/test/testcases.pytskipIfDBFeatureqs cs#tfdddjS(uC Skip a test unless a database has all the named features. cstdD S(Ncss$|]}ttj|tVqdS(N(RwRR3Rz(RCRy((s9/usr/lib/python2.7/site-packages/django/test/testcases.pys s(RG((R3(s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRzsu'Database doesn't support feature(s): %su, (RxRH(R3((R3s9/usr/lib/python2.7/site-packages/django/test/testcases.pytskipUnlessDBFeature{s cs#tfdddjS(uF Skip a test unless a database has any of the named features. cstdD S(Ncss$|]}ttj|tVqdS(N(RwRR3Rz(RCRy((s9/usr/lib/python2.7/site-packages/django/test/testcases.pys s(Rj((R3(s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRzsu2Database doesn't support any of the feature(s): %su, (RxRH(R3((R3s9/usr/lib/python2.7/site-packages/django/test/testcases.pytskipUnlessAnyDBFeatures tQuietWSGIRequestHandlercBseZdZdZRS(u Just a regular WSGIRequestHandler except it doesn't log to the standard output any of the requests received, so as to not clutter the output for the tests' results. cGsdS(N((R((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt log_messages(RNRORcR(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR~stFSFilesHandlercBsDeZdZdZdZdZdZdZdZRS(u WSGI middleware that intercepts calls to a directory, as defined by one of the *_ROOT settings, and serves those files, publishing them under *_URL. cCs5||_t|j|_tt|jdS(N(t applicationR*t get_base_urltbase_urlRARRB(R6R((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRBs cCs"|j|jdo!|jd S(u Checks if the path should be handled. Ignores the path if: * the host is provided as part of the base_url * the request's path isn't under the media path (or equal) ii(RR(R6R((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt_should_handlescCs!|t|jd}t|S(uR Returns the relative path to the file on disk for the given URL. i(RFRR-(R6RR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyt file_pathscCs`ddlm}|j|jrJy|j|SWqJ|k rFqJXntt|j|S(Ni(tHttp404(t django.httpRRRR.RARt get_response(R6RR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs cCs[|j|j}tjt|}|jddjd}t||d|jS(Nu\u/t document_root( RRt posixpathtnormpathR(treplacetlstripR.t get_base_dir(R6Rt os_rel_pathtfinal_rel_path((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyR.scCs>|jt|s%|j||Stt|j||S(N(RR RRARRf(R6tenvirontstart_response((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRfs( RNRORcRBRRRR.Rf(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs   t_StaticFilesHandlercBs eZdZdZdZRS(u Handler for serving static files. A private class that is meant to be used solely as a convenience by LiveServerThread. cCstjS(N(Rt STATIC_ROOT(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRscCstjS(N(Rt STATIC_URL(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs(RNRORcRR(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs t_MediaFilesHandlercBs eZdZdZdZRS(u Handler for serving the media files. A private class that is meant to be used solely as a convenience by LiveServerThread. cCstjS(N(Rt MEDIA_ROOT(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRscCstjS(N(Rt MEDIA_URL(R6((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs(RNRORcRR(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRs tLiveServerThreadcBs8eZdZdddZdZdZdZRS(uL Thread for running a live http server while the tests are running. icCsS||_||_tj|_d|_||_||_t t |j dS(N( RRt threadingtEventtis_readyR/terrortstatic_handlertconnections_overrideRARRB(R6RRRR((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyRBs     cCs|jr6x*|jjD]\}}|t|tobjectRPRaRbRRgR!RVRdRxR{R|R}R~RRRtThreadRRR(((s9/usr/lib/python2.7/site-packages/django/test/testcases.pyts~       "(( &  b   3  3M