Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/django/test/__pycache__/utils.cpython-312.pyc

250 lines
44 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
j<> i<><00><00><><00>ddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
m Z ddl m Z ddlmZddlmZddlmZmZmZddlmZmZdd lmZdd
lmZdd lmZdd lm Z m!Z!dd l"m#Z#ddl$m%Z%ddl&m'Z'm(Z(ddl)m*Z*m+Z+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4m5Z5ddl6m7Z7ddl8m9Z9 ddl:Z:dZ<e=ed<18>Z>Gd<19>d<1A>Z?Gd<1B>de@<40>ZAd<1D>ZBGd<1E>d<1F>ZCdNd <20>ZDd!<21>ZEdd"d"dddd#<23>d$<24>ZFd%<25>ZGd&<26>ZHdNd'<27>ZIdOd(<28>ZJdNd)<29>ZKGd*<2A>d+<2B>ZLGd,<2C>d-eL<65>ZMGd.<2E>d/eM<65>ZNGd0<64>d1eL<65>ZOd2<64>ZPGd3<64>d4<64>ZQGd5<64>d6eL<65>ZRee>d7<64>ZSe d8<64><00>ZTe d9<64><00>ZUe d:<3A><00>ZVd;<3B>ZWd<<3C>ZXd=<3D>ZYe d><3E><00>ZZd?<3F>Z[Gd@<40>dAeL<65>Z\GdB<64>dC<64>Z]GdD<64>dEeL<65>Z^GdF<64>dG<64>Z_GdH<64>dI<64>Z`dJ<64>Zae ddK<64>dL<64><02>ZbdM<64>Zcy#e;$rdZ:Y<00><01>wxYw)P<>N)<01>contextmanager)<01>wraps)<01>StringIO)<01>chain)<01>SimpleNamespace)<03>TestCase<73>skipIf<49>
skipUnless)<02>Node<64> parseString)<01>iscoroutinefunction)<01>apps)<01>Apps)<02>UserSettingsHolder<65>settings)<01>mail)<01>ImproperlyConfigured)<02>request_started<65>setting_changed)<03>DEFAULT_DB_ALIAS<41> connections<6E> reset_queries)<01>Options)<01>Template)<01>template_rendered)<02>get_script_prefix<69>set_script_prefix)<01>
deactivate)<01>PYPY)<10> Approximate<74> ContextList<73>isolate_lru_cache<68>garbage_collect<63>
get_runner<EFBFBD>CaptureQueriesContext<78>ignore_warnings<67> isolate_apps<70>modify_settings<67>override_settings<67>override_system_checks<6B>tag<61>requires_tz_support<72>setup_databases<65>setup_test_environment<6E>teardown_test_environment<6E>tzsetc<00> <00>eZdZdd<01>Zd<02>Zd<03>Zy)r c<00> <00>||_||_y<00>N)<02>val<61>places)<03>selfr4r5s <20>@E:\Project\pygoedge\.venv\Lib\site-packages\django/test/utils.py<70>__init__zApproximate.__init__>s<00><00><16><04><08><1C><04> <0B>c<00>,<00>t|j<00>Sr3)<02>reprr4<00>r6s r7<00>__repr__zApproximate.__repr__Bs<00><00><13>D<EFBFBD>H<EFBFBD>H<EFBFBD>~<7E>r9c<00><><00>|j|k(xs/tt|j|z
<00>|j<00>dk(S<00>Nr)r4<00>round<6E>absr5)r6<00>others r7<00>__eq__zApproximate.__eq__Es5<00><00><13>x<EFBFBD>x<EFBFBD>5<EFBFBD> <20>R<>E<EFBFBD>#<23>d<EFBFBD>h<EFBFBD>h<EFBFBD><15>.><3E>*?<3F><14><1B><1B>$M<>QR<51>$R<>Rr9N)<01>)<06>__name__<5F>
__module__<EFBFBD> __qualname__r8r=rC<00>r9r7r r =s<00><00><1D><1E>Sr9r c<00>6<00><00>eZdZdZ<03>fd<02>Zdd<03>Zd<04>Zd<05>Z<07>xZS)r!zp
A wrapper that provides direct key access to context items contained
in a list of context objects.
c<00>|<00><01>t|t<00>r|D] }||vs<01>||cSt|<01><00>t<00>|<00>|<01>Sr3)<05>
isinstance<EFBFBD>str<74>KeyError<6F>super<65> __getitem__)r6<00>key<65>
subcontext<EFBFBD> __class__s <20>r7rOzContextList.__getitem__OsE<00><><00> <15>c<EFBFBD>3<EFBFBD> <1F>"<22>
<EFBFBD><16>*<2A>$<24>%<25>c<EFBFBD>?<3F>*<2A>#<23><1B>3<EFBFBD>-<2D> <1F><18>7<EFBFBD>&<26>s<EFBFBD>+<2B> +r9c<00>H<00> |j|<01>S#t$r|cYSwxYwr3)rOrM)r6rP<00>defaults r7<00>getzContextList.getXs,<00><00> <1B><17>#<23>#<23>C<EFBFBD>(<28> (<28><><17> <1B><1A>N<EFBFBD> <1B>s <00><00> !<03>!c<00>.<00> ||y#t$rYywxYw)NFT)rM)r6rPs r7<00> __contains__zContextList.__contains__^s'<00><00> <19> <10><13>I<EFBFBD><14><><18> <19><18> <19>s <00><00> <03>c<00>L<00>ttjd<01>|D<00><00><00>S)z0
Flattened keys of subcontexts.
c3<00>.K<00>|] }|D]}|<02><01><00><00>y<00>wr3rH)<03>.0rQ<00>ds r7<00> <genexpr>z#ContextList.keys.<locals>.<genexpr>is<00><00><><00>&T<>4<EFBFBD>Z<EFBFBD><1A>A<EFBFBD>q<EFBFBD><1A>q<EFBFBD>4<EFBFBD>s<00>)<03>setr<00> from_iterabler<s r7<00>keyszContextList.keyses <00><00><13>5<EFBFBD>&<26>&<26>&T<>4<EFBFBD>&T<>T<>U<>Ur9r3) rErFrG<00>__doc__rOrUrWr_<00> __classcell__<5F>rRs@r7r!r!Is<00><><00><08>
,<2C><1B> <14>Vr9r!c<00>h<00>tj|||<01><01>|jj|<01>S)zt
An instrumented Template render method, providing a signal that can be
intercepted by the test Client.
)<03>sender<65>template<74>context)r<00>send<6E>nodelist<73>render)r6rfs r7<00>instrumented_test_renderrjls+<00><00>
<16><1A><1A>$<24><14>w<EFBFBD>G<> <0F>=<3D>=<3D> <1F> <1F><07> (<28>(r9c<00> <00>eZdZy)<02>
_TestStateN)rErFrGrHr9r7rlrlus<00><00>r9rlc<00><><00>ttd<01>r td<02><00>|<00>tj}t <00>}|t_tj|_gtj<00>d<04>t_tj|_ |t_tj|_ dt_
tj|_tt_ gt _t%<00>y)z<>
Perform global pre-test setup, such as installing the instrumented template
renderer and setting the email backend to the locmem email backend.
<20>
saved_datazxsetup_test_environment() was already called and can't be called again without first calling teardown_test_environment().N<>
testserverz-django.core.mail.backends.locmem.EmailBackend)<13>hasattrrl<00> RuntimeErrorr<00>DEBUGrrn<00> ALLOWED_HOSTS<54> allowed_hosts<74>debug<75> EMAIL_BACKEND<4E> email_backendr<00>_render<65>template_renderrjr<00>outboxr)rurns r7r.r.ys<><00><00>
<0F>z<EFBFBD><<3C>(<28><1A> G<01>
<EFBFBD>
<EFBFBD>
 <0A>}<7D><18><0E><0E><05> <20>"<22>J<EFBFBD>&<26>J<EFBFBD><19>'<27>5<>5<>J<EFBFBD><1C>D<>x<EFBFBD>5<>5<>D<>|<7C>D<>H<EFBFBD><1A><1F>~<7E>~<7E>J<EFBFBD><14><1A>H<EFBFBD>N<EFBFBD>'<27>5<>5<>J<EFBFBD><1C>L<>H<EFBFBD><1A>!)<29>!1<>!1<>J<EFBFBD><1E>/<2F>H<EFBFBD><14><14>D<EFBFBD>K<EFBFBD><0E>Lr9c<00><><00>tj}|jt_|j
t_|jt_|jt_ t`t` y)z<>
Perform any global post-test teardown, such as restoring the original
template renderer and restoring the email sending functions.
N)rlrnrtrrsrurrrwrvryrrxrrz)rns r7r/r/<00>sQ<00><00>
<1C>&<26>&<26>J<EFBFBD>'<27>5<>5<>H<EFBFBD><1A><1F>%<25>%<25>H<EFBFBD>N<EFBFBD>'<27>5<>5<>H<EFBFBD><1A>!<21>1<>1<>H<EFBFBD><14><12><1D> <0C> r9F)<06> time_keeper<65>keepdb<64> debug_sql<71>parallel<65>aliases<65>serialized_aliasesc
<00><><00>|<02>
t<00>}t|<06>\} }
g} g} | j<00>D<00>]\} }d}|D<00>] }t|}| j || |duf<03>|<0E><>|}|j d|z<00>5|j j|| |d<03><04>|<07>||vr| j |<10>ddd<01>|dkDs<01><>t|<05>D]I}|j d|z<00>5|j jt|dz<00>||<03><07>ddd<01><00>K<00><>t|j jt|j<00><00><01><00><01>|
j<00>D]8\}}t|j jt|j<00><00>:| D]!}|j j<00>|_<00>#|rtD]}dt|_<00>| S#1swY<00><01>/xYw#1swY<00><01>+xYw) zCreate the test databases.Nz Creating '%s'F)<04> verbosity<74> autoclobberr}<00> serialize<7A>z Cloning '%s'<27><03>suffixr<78>r}T)<11>NullTimeKeeper<65> get_unique_databases_and_mirrors<72>valuesr<00>append<6E>timed<65>creation<6F>create_test_db<64>range<67> clone_test_dbrL<00>set_as_test_mirror<6F> settings_dict<63>items<6D>serialize_db_to_string<6E>_test_serialized_contents<74>force_debug_cursor)r<><00> interactiver|r}r~rr<>r<><00>kwargs<67>test_databases<65>mirrored_aliases<65> old_names<65>serialize_connections<6E>db_name<6D> first_alias<61>alias<61>
connection<EFBFBD>index<65> mirror_alias<61>serialize_connections r7r-r-<00>s <00><00><13><1A>$<24>&<26> <0B>'G<><07>'P<>$<24>N<EFBFBD>$<24><12>I<EFBFBD><1E><19>*<2A>1<>1<>3<><18><07><17><1A> <0B><1C>E<EFBFBD>$<24>U<EFBFBD>+<2B>J<EFBFBD> <15> <1C> <1C>j<EFBFBD>'<27>;<3B>$<24>3F<33>G<> H<><1B>"<22>#<23> <0B> <20>&<26>&<26>'8<>5<EFBFBD>'@<40>A<><1E>'<27>'<27>6<>6<>"+<2B>(3<>O<EFBFBD>%<25>"'<27> 7<><16> *<2A>1<>U<EFBFBD>>P<>5P<35>-<2D>4<>4<>Z<EFBFBD>@<40>B<01><1C>a<EFBFBD><<3C>!&<26>x<EFBFBD><1F><05>(<28>.<2E>.<2E>/?<3F>%<25>/G<>H<>&<26>/<2F>/<2F>=<3D>=<3D>'*<2A>5<EFBFBD>1<EFBFBD>9<EFBFBD>~<7E>*3<>'-<2D>><3E><1E>I<01>H<>"1<><1C>E<EFBFBD>"<22>+<2B>+<2B>><3E>><3E><1F> <0B>,<2C>:<3A>:<3A><12>5<1D>4<>B 0<>5<>5<>7<><1B><05>|<7C><13>E<EFBFBD><1A>#<23>#<23>6<>6<> <17> <0C> %<25> 3<> 3<>
<EFBFBD> 8<>!6<><1C> <20> )<29> )<29> @<40> @<40> B<> <1D>6<>!6<>
<11> <20>E<EFBFBD>48<34>K<EFBFBD><05> <1E> 1<>!<21> <15><14>WB<01>A<><41>I<01>H<>s<00>58G<07>+G' <09>G$ <0B>'G1 c#<00><>K<00>|D]L}t|t<00>rtd|<01>d|<00>d<03><05><00>t|t<00>r|<01><01><00>:t |<01>Ed{<00><02><02><00>Ny7<00><07>w)z<>
Return an iterator over a test suite's unittest.TestCase objects.
The tests argument can also be an iterable of TestCase objects.
zTest z< must be a test case or test suite not string (was found in z).N)rKrL<00> TypeErrorr<00>iter_test_cases)<02>tests<74>tests r7r<>r<><00>si<00><00><><00> <16><04> <15>d<EFBFBD>C<EFBFBD> <20><1C><17><04>x<EFBFBD> !<21>!&<26> <09><12>-<2D><0E> <0E> <16>d<EFBFBD>H<EFBFBD> %<25><16>J<EFBFBD>'<27>t<EFBFBD>,<2C> ,<2C> ,<2C><16> -<2D>s<00>A A<01> A<06>Ac<00><><00>g}t<00>}i}|D]^\}\}}t<00>}|D]#} |j|j| g<00><00><00>%|j|<07>st d|z<00><00>|||<<00>`|rud}
g} |D]Z\} \} }|| j |<03>r)|j|<07>|j | | |ff<02>d}
<EFBFBD>F| j | | |ff<02><00>\|
s t d<04><00>| }|r<01>u|S)zp
Reorder test_databases into an order that honors the dependencies
described in TEST[DEPENDENCIES].
zHCircular dependency: databases %r depend on each other, but are aliases.FTz)Circular dependency in TEST[DEPENDENCIES])r]<00>updaterU<00>
isdisjointr<00>issubsetr<74>)r<><00> dependencies<65>ordered_test_databases<65>resolved_databases<65>dependencies_map<61>sig<69>_r<5F><00>all_depsr<73><00>changed<65>deferred<65> signaturer<65>s r7<00>dependency_orderedr<64>s+<00><00>
 <20><1A><1C><15><16><1A><14>,<2C><19><03>\<5C>a<EFBFBD><17><16>5<EFBFBD><08><1C>E<EFBFBD> <14>O<EFBFBD>O<EFBFBD>L<EFBFBD>,<2C>,<2C>U<EFBFBD>B<EFBFBD>7<> 8<><1D><17>"<22>"<22>7<EFBFBD>+<2B>&<26>#<23>%,<2C>-<2D><0E> <0E>!)<29><18><13><1D>,<2C> <19><17><07><15><08>.<<3C> )<29>I<EFBFBD>)<29><07><17><1F> <09>*<2A>3<>3<>4F<34>G<>"<22>)<29>)<29>'<27>2<>&<26>-<2D>-<2D>y<EFBFBD>7<EFBFBD>G<EFBFBD>:L<>.M<>N<><1E><07><18><0F><0F><19>W<EFBFBD>g<EFBFBD>,><3E> ?<3F>@<40> .<<3C><17>&<26>'R<>S<> S<>!<21><0E> <19> "<22>!r9c<00><><00>|<00>t}i}i}i}ttjj<00>}tD]<5D>}t|}|jd}|dr |d||<<00>)||vs<01>.|j |jj<00>|jdgf<02>}|tk(r|dj d|<05>n|dj|<05>d|vr |d||<<00><>|tk7s<01><>|jj<00>|k7s<01><>|jdtg<01>||<<00><>tt|j<00>|<03><00>}||fS)a<>
Figure out which databases actually need to be created.
Deduplicate entries in DATABASES that correspond the same database or are
configured as test mirrors.
Return two values:
- test_databases: ordered mapping of signatures to (name, list of aliases)
where all aliases share the same underlying database.
- mirrored_aliases: mapping of mirror aliases to original aliases.
<20>TEST<53>MIRROR<4F>NAMEr<45>r<00> DEPENDENCIES) rrr<><00>test_db_signaturer<65><00>
setdefault<EFBFBD>insertr<74>rU<00>dictr<74>r<>) r<>r<>r<>r<><00> default_sigr<67>r<><00> test_settings<67>items r7r<>r<>8sa<00><00><0F><EFBFBD><1D><07><19><14><17>N<EFBFBD><15>L<EFBFBD><1D>.<2E>/<2F>8<>8<>J<>J<>L<>K<EFBFBD><1C><05> <20><15>'<27>
<EFBFBD>"<22>0<>0<><16>8<> <0A> <18><18> "<22>&3<>H<EFBFBD>&=<3D> <1C>U<EFBFBD> #<23> <12>g<EFBFBD> <1D>"<22>,<2C>,<2C><1A>#<23>#<23>5<>5<>7<><1B>)<29>)<29>&<26>1<>2<EFBFBD>6<><0E>D<EFBFBD> <15>(<28>(<28><14>Q<EFBFBD><07><0E><0E>q<EFBFBD>%<25>(<28><14>Q<EFBFBD><07><0E><0E>u<EFBFBD>%<25><1D><1D>.<2E>&3<>N<EFBFBD>&C<> <0C>U<EFBFBD>#<23><1A>-<2D>-<2D>"<22>+<2B>+<2B>=<3D>=<3D>?<3F>;<3B>N<>*7<>*;<3B>*;<3B>&<26>)9<>(:<3A>+<16>L<EFBFBD><15>'<27>;<1D>B<1A>,<2C>^<5E>-A<>-A<>-C<>\<5C>R<>S<>N<EFBFBD> <19>+<2B> +<2B>+r9c<00><><00>|D]e\}}}|s<01>
|dkDr:t|<02>D],}|jjt|dz<00>||<03><02><00>.|jj|||<03><00>gy)z%Destroy all the non-mirror databases.r<>r<>N)r<>r<><00>destroy_test_dbrL)<08>
old_configr<EFBFBD>rr}r<><00>old_name<6D>destroyr<79>s r7<00>teardown_databasesr<73>pso<00><00>)3<>%<25>
<EFBFBD>H<EFBFBD>g<EFBFBD> <12><17>!<21>|<7C>"<22>8<EFBFBD>_<EFBFBD>E<EFBFBD><1E>'<27>'<27>7<>7<>"<22>5<EFBFBD>1<EFBFBD>9<EFBFBD>~<7E>"+<2B>%<25>8<><16>-<2D> <17> <1F> <1F> /<2F> /<2F><08>)<29>V<EFBFBD> L<>*4r9c<00><><00>|xs |j}|jd<01>}t|<02>dkDrdj|dd<00>}nd}t |ii|d<00>}t ||d<00>S)N<>.r<><00><><EFBFBD><EFBFBD><EFBFBD>)<06> TEST_RUNNER<45>split<69>len<65>join<69>
__import__<EFBFBD>getattr)r<00>test_runner_class<73> test_path<74>test_module_name<6D> test_modules r7r$r$~sp<00><00>)<29>A<>X<EFBFBD>-A<>-A<><15>!<21>'<27>'<27><03>,<2C>I<EFBFBD>
<EFBFBD>9<EFBFBD>~<7E><01><19><1E>8<EFBFBD>8<EFBFBD>I<EFBFBD>c<EFBFBD>r<EFBFBD>N<EFBFBD>3<><18><1E><18><1C>-<2D>r<EFBFBD>2<EFBFBD>y<EFBFBD><12>}<7D>E<>K<EFBFBD> <12>;<3B> <09>"<22> <0A> .<2E>.r9c<00>B<00>eZdZdZd d<03>Zd<04>Zd<05>Zd<06>Zd<07>Zd<08>Z d <09>Z
d
<EFBFBD>Z y) <0C>TestContextDecoratora<72>
A base class that can either be used as a context manager during tests
or as a test function or unittest.TestCase subclass decorator to perform
temporary alterations.
`attr_name`: attribute assigned the return value of enable() if used as
a class decorator.
`kwarg_name`: keyword argument passing the return value of enable() if
used as a function decorator.
Nc<00> <00>||_||_yr3)<02> attr_name<6D>
kwarg_name)r6r<>r<>s r7r8zTestContextDecorator.__init__<5F>s<00><00>"<22><04><0E>$<24><04>r9c<00><00>t<00>r3<00><01>NotImplementedErrorr<s r7<00>enablezTestContextDecorator.enable<6C><00><00><00>!<21>!r9c<00><00>t<00>r3r<>r<s r7<00>disablezTestContextDecorator.disable<6C>r<>r9c<00>"<00>|j<00>Sr3)r<>r<s r7<00> __enter__zTestContextDecorator.__enter__<5F>s<00><00><13>{<7B>{<7B>}<7D>r9c<00>$<00>|j<00>yr3)r<><00>r6<00>exc_type<70> exc_value<75> tracebacks r7<00>__exit__zTestContextDecorator.__exit__<5F>s <00><00> <0C> <0C> <0C>r9c<00>r<00><00><03>t|t<00>r|j<00><03><03>fd<01>}||_|Std<02><00>)Nc<00><><00><02><00>j<00>}|j<00>j<00><00>jrt |<00>j|<01><00>|<00>yr3)r<><00>
addCleanupr<EFBFBD>r<><00>setattr)<04>
inner_selfrf<00>decorated_setUpr6s <20><>r7<00>setUpz2TestContextDecorator.decorate_class.<locals>.setUp<55>s?<00><><00><1E>+<2B>+<2B>-<2D><07><1A>%<25>%<25>d<EFBFBD>l<EFBFBD>l<EFBFBD>3<><17>><3E>><3E><1B>J<EFBFBD><04><0E><0E><07>@<40><1F>
<EFBFBD>+r9z1Can only decorate subclasses of unittest.TestCase)<04>
issubclassrr<>r<>)r6<00>clsr<73>r<>s` @r7<00>decorate_classz#TestContextDecorator.decorate_class<73>s5<00><><00> <15>c<EFBFBD>8<EFBFBD> $<24>!<21>i<EFBFBD>i<EFBFBD>O<EFBFBD> ,<2C><1E>C<EFBFBD>I<EFBFBD><16>J<EFBFBD><17>K<>L<>Lr9c<00>t<00><00><01>t<00><01>rt<00><01><00><01>fd<01><08>}|St<00><01><00><01>fd<02><08>}|S)Nc<00><00><><00>K<00><00>5}<02>jr||<01>j<<00>|i|<01><01><01>d{<00><03><03>cddd<00>S7<00> #1swYyxYw<01>wr3<00>r<><00><05>argsr<73>rf<00>funcr6s <20><>r7<00>innerz5TestContextDecorator.decorate_callable.<locals>.inner<65>sE<00><><00><><00><19>W<EFBFBD><1B><EFBFBD><EFBFBD>29<32><06>t<EFBFBD><EFBFBD><EFBFBD>/<2F>!%<25>t<EFBFBD>!6<>v<EFBFBD>!6<>6<><1A>T<EFBFBD>7<><37><1A>T<EFBFBD>s%<00>A <01>'=<03>;<06>=<03>
A <01>=<03>A<07>A c<00>z<00><02><00>5}<02>jr||<01>j<<00>|i|<01><01>cddd<00>S#1swYyxYwr3r<>r<>s <20><>r7r<>z5TestContextDecorator.decorate_callable.<locals>.inner<65>s4<00><><00><19>W<EFBFBD><1B><EFBFBD><EFBFBD>29<32><06>t<EFBFBD><EFBFBD><EFBFBD>/<2F><1F><14>0<><16>0<><1A>T<EFBFBD>T<EFBFBD>s<00>#1<03>:)r r)r6r<>r<>s`` r7<00>decorate_callablez&TestContextDecorator.decorate_callable<6C>sI<00><><00> <1E>t<EFBFBD> $<24><13>4<EFBFBD>[<5B> 7<><19> 7<><15> <0C><13>4<EFBFBD>[<5B> 1<><19> 1<> <15> r9c<00><><00>t|t<00>r|j|<01>St|<01>r|j |<01>St dt|<01>z<00><00>)Nz!Cannot decorate object of type %s)rK<00>typer<65><00>callabler<65>r<>)r6<00> decorateds r7<00>__call__zTestContextDecorator.__call__<5F>sK<00><00> <15>i<EFBFBD><14> &<26><17>&<26>&<26>y<EFBFBD>1<> 1<> <15>i<EFBFBD> <20><17>)<29>)<29>)<29>4<> 4<><17>;<3B>d<EFBFBD>9<EFBFBD>o<EFBFBD>M<>N<>Nr9)NN) rErFrGr`r8r<>r<>r<>r<>r<>r<>rrHr9r7r<>r<><00>s1<00><00>
<08>%<25>"<22>"<22><1D><17> M<01><15>,Or9r<>c<00>><00><00>eZdZdZdZ<04>fd<03>Zd<04>Zd<05>Zd<06>Zd<07>Z <09>xZ
S)r)a4
Act as either a decorator or a context manager. If it's a decorator, take a
function and return a wrapped function. If it's a contextmanager, use it
with the ``with`` statement. In either event, entering/exiting are called
before and after, respectively, the function/block is executed.
Nc <00>0<00><01>||_t<00>|<00> <00>yr3)<03>optionsrNr8<00>r6r<>rRs <20>r7r8zoverride_settings.__init__<5F>s<00><><00><1D><04> <0C> <0A><07><18>r9c<00>|<00>d|jvr# tj|jd<00>t t j<00>}|jj<00>D]\}}t|||<03><00>t j|_
|t _|jj<00>D]7\}} tjt jj||d<02><03><00>9y#t$rtj<00><00>wxYw#t$r!}||_|j<00>Yd}~<04><>d}~wwxYw)N<>INSTALLED_APPST<53>rd<00>setting<6E>value<75>enter)rr<00>set_installed_apps<70> Exception<6F>unset_installed_appsrr<00>_wrappedr<64>r<><00>wrappedrrgrR<00>enable_exceptionr<6E>)r6<00>overriderP<00> new_value<75>excs r7r<>zoverride_settings.enable<6C>s<00><00> <1C>t<EFBFBD>|<7C>|<7C> +<2B> <16><14>'<27>'<27><04> <0C> <0C>5E<35>(F<>G<>&<26>h<EFBFBD>&7<>&7<>8<><08>"<22>l<EFBFBD>l<EFBFBD>0<>0<>2<>N<EFBFBD>C<EFBFBD><19> <13>H<EFBFBD>c<EFBFBD>9<EFBFBD> -<2D>3<><1F>(<28>(<28><04> <0C>$<24><08><19>"<22>l<EFBFBD>l<EFBFBD>0<>0<>2<>N<EFBFBD>C<EFBFBD><19> <1F><1F>$<24>$<24>#<23>,<2C>,<2C>6<>6<><1F>#<23><1E> <12>3<><33><1D> <16><14>)<29>)<29>+<2B><15> <16><> <1D> <1F>(+<2B><04>%<25><14> <0C> <0C><0E><0E><> <1F>s#<00>"C/<00>;1D<02>/D<03> D;<05>D6<05>6D;c<00><><00>d|jvrtj<00>|jt_|`g}|jD]U}t t|d<00>}tjtj
j||d<02><03>}|j|<04><00>W|j<00>|j}d|_ |<05>|D]\}}t|t<00>s<01>|<07>y)Nr Fr
)rrrrrrr<>r<00> send_robustrR<00>extendrrKr)r6<00> responsesrPr<00>responses_for_settingrr<><00>responses r7r<>zoverride_settings.disable<6C>s<><00><00> <1B>t<EFBFBD>|<7C>|<7C> +<2B> <10> %<25> %<25> '<27> <20>L<EFBFBD>L<EFBFBD><08><19> <10>L<EFBFBD><16> <09><17><<3C><<3C>C<EFBFBD><1F><08>#<23>t<EFBFBD>4<>I<EFBFBD>$3<>$?<3F>$?<3F><1F>(<28>(<28>2<>2<><1B><1F><1B> %<0E> !<21> <16> <1C> <1C>2<> 3<> <20> <10> <20> <20> ,<2C><16>'<27>'<27>C<EFBFBD>$(<28>D<EFBFBD> !<21><15>I<EFBFBD>$<24>K<EFBFBD>A<EFBFBD>x<EFBFBD><19>(<28>I<EFBFBD>.<2E><1E><0E>%r9c<00>~<00>|j<00>|j|_yi|j<00>|j<00>|_yr3)<02>_overridden_settingsr<00>r6<00> test_funcs r7<00> save_optionszoverride_settings.save_optionss><00><00> <14> )<29> )<29> 1<>-1<>\<5C>\<5C>I<EFBFBD> *<2A>.<0E><1B>0<>0<>.<0E><16>,<2C>,<2C>.<0E>I<EFBFBD> *r9c<00>b<00>ddlm}t||<02>s td<03><00>|j |<01>|S)Nr)<01>SimpleTestCasezPOnly subclasses of Django SimpleTestCase can be decorated with override_settings)<05> django.testr#r<><00>
ValueErrorr!)r6r<>r#s r7r<>z override_settings.decorate_classs6<00><00>.<2E><19>#<23>~<7E>.<2E><1C>)<29><0E> <0E> <0A><19><19>#<23><1E><12>
r9) rErFrGr`rr8r<>r<>r!r<>rarbs@r7r)r)<00>s)<00><><00><08><1C><14><1B><1F>4<1F>.<0E> r9r)c<00>2<00><00>eZdZdZ<03>fd<02>Zd<03>Z<05>fd<04>Z<06>xZS)r(z<>
Like override_settings, but makes it possible to append, prepend, or remove
items instead of redefining the entire list.
c<00><><00><01>|r|rJ<00>|d|_n"|rJ<00>t|j<00><00>|_tt|<00><00>yr?)<06>
operations<EFBFBD>listr<74>rNr)r8)r6r<>r<>rRs <20>r7r8zmodify_settings.__init__/s@<00><><00> <0F><1D> <1D>:<3A>"<22>1<EFBFBD>g<EFBFBD>D<EFBFBD>O<EFBFBD><1B>O<EFBFBD>8<EFBFBD>"<22>6<EFBFBD><<3C><<3C>><3E>2<>D<EFBFBD>O<EFBFBD> <0A><1F><14>/<2F>1r9c<00><><00>|j<00>|j|_yt|j<00>|jz|_yr3)<03>_modified_settingsr(r)rs r7r!zmodify_settings.save_options9s;<00><00> <14> '<27> '<27> /<2F>+/<2F>?<3F>?<3F>I<EFBFBD> (<28><15>Y<EFBFBD>1<>1<>2<>T<EFBFBD>_<EFBFBD>_<EFBFBD>D<> <16> (r9c <00>"<00><01>i|_|jD]<5D>\}} |j|}|j <00>D]{\}}t|t<00>r|g}|dk(r||D<00>cgc] }||vs<01>|<06><02> c}z }<03>7|dk(r|D<00>cgc] }||vs<01>|<06><02> c}|z}<03>U|dk(r|D<00>cgc] }||vs<01>|<06><02> }}<06>otd|z<00><00>||j|<<00><>t<00>|<00>-<00>y#t$rtt t
|g<00><00>}Y<00><>wxYwcc}wcc}wcc}w)Nr<4E><00>prepend<6E>removezUnsupported action: %s) rr(rMr)r<>rr<>rKrLr%rNr<>)r6<00>namer(r <00>actionr<6E>r<>rRs <20>r7r<>zmodify_settings.enableBs+<00><><00><19><04> <0C> $<24><0F><0F> <1C>D<EFBFBD>*<2A> :<3A><1D> <0C> <0C>T<EFBFBD>*<2A><05>",<2C>!1<>!1<>!3<> <0A><06><05><1D>e<EFBFBD>S<EFBFBD>)<29>"<22>G<EFBFBD>E<EFBFBD><19>X<EFBFBD>%<25><19>u<EFBFBD>J<>u<EFBFBD>t<EFBFBD><04>E<EFBFBD>8I<38>d<EFBFBD>u<EFBFBD>J<>J<>E<EFBFBD><1B>y<EFBFBD>(<28>.3<EFBFBD>I<>e<EFBFBD>d<EFBFBD>t<EFBFBD>5<EFBFBD>7H<37>T<EFBFBD>e<EFBFBD>I<>E<EFBFBD>Q<>E<EFBFBD><1B>x<EFBFBD>'<27>.3<EFBFBD>I<>e<EFBFBD>d<EFBFBD>t<EFBFBD>5<EFBFBD>7H<37>T<EFBFBD>e<EFBFBD>E<EFBFBD>I<>$<24>%=<3D><06>%F<>G<>G<>"4<>"'<27>D<EFBFBD>L<EFBFBD>L<EFBFBD><14> <1E>'!0<>( <0E><07><0E><18><><1C> :<3A><1C>W<EFBFBD>X<EFBFBD>t<EFBFBD>R<EFBFBD>8<>9<><05> :<3A><>K<01><>I<><49>Is5<00>C<02> D
<EFBFBD>(D
<EFBFBD>; D<08>D<08> D <08>#D <08>#C?<05>>C?)rErFrGr`r8r!r<>rarbs@r7r(r()s<00><><00><08>
2<><0E><19>r9r(c<00>0<00><00>eZdZdZd<05>fd<02> Zd<03>Zd<04>Z<06>xZS)r*z<>
Act as a decorator. Override list of registered system checks.
Useful when you override `INSTALLED_APPS`, e.g. if you exclude `auth` app,
you also need to exclude its system checks.
c<00>X<00><01>ddlm}||_||_||_t<00>|<00><00>y)Nr)<01>registry)<06>django.core.checks.registryr3<00>
new_checks<EFBFBD>deployment_checksrNr8)r6r5r6r3rRs <20>r7r8zoverride_system_checks.__init__bs'<00><><00>8<> <20><04> <0A>$<24><04><0F>!2<><04><1E> <0A><07><18>r9c <00><><00>|jj|_t<00>|j_|jD]*}|jj
|gt |dd<02><00><01><06><00>,|jj|_|j<00>Vt<00>|j_|jD]-}|jj
|gt |dd<02><00><01>ddi<01><00>/yy)N<>tagsrH<00>deployT) r3<00>registered_checks<6B>
old_checksr]r5<00>registerr<72>r6<00>old_deployment_checks)r6<00>checks r7r<>zoverride_system_checks.enablejs<><00><00><1E>-<2D>-<2D>9<>9<><04><0F>*-<2D>%<25><04> <0A> <0A>'<27><19>_<EFBFBD>_<EFBFBD>E<EFBFBD> "<22>D<EFBFBD>M<EFBFBD>M<EFBFBD> "<22> "<22>5<EFBFBD> F<>7<EFBFBD>5<EFBFBD>&<26>"<22>+E<> F<>%<25>%)<29>]<5D>]<5D>%D<>%D<><04>"<22> <0F> !<21> !<21> -<2D>.1<EFBFBD>e<EFBFBD>D<EFBFBD>M<EFBFBD>M<EFBFBD> +<2B><1D>/<2F>/<2F><05>&<26><04> <0A> <0A>&<26>&<26>u<EFBFBD>W<>w<EFBFBD>u<EFBFBD>f<EFBFBD>b<EFBFBD>/I<>W<>RV<52>W<>0<> .r9c<00>p<00>|j|j_|j|j_yr3)r;r3r:r=r6r<s r7r<>zoverride_system_checks.disableus$<00><00>*.<2E>/<2F>/<2F><04> <0A> <0A>'<27>*.<2E>*D<>*D<><04> <0A> <0A>'r9r3<00>rErFrGr`r8r<>r<>rarbs@r7r*r*[s<00><><00><08> <1B> X<01>Er9r*c<00><><00><06><07><08> <09>
<EFBFBD> <0B> <0C>tjd<01><00><06>fd<02><08> d<03><00> d<04><00>
<EFBFBD> <09> fd<05><08> d<06><00><07><07><08>
<EFBFBD> fd<07><08>d<08>}|j<00>jd d
<EFBFBD>}|j<00>jd d
<EFBFBD>}|j d <0B>s d }||z}||z}|t |<00><00>}|t |<01><00>}<00>||<05>S) al
Try to do a 'xml-comparison' of want and got. Plain string comparison
doesn't always work because, for example, attribute ordering should not be
important. Ignore comment nodes, processing instructions, document type
node, and leading and trailing whitespaces.
Based on https://github.com/lxml/lxml/blob/master/src/lxml/doctestcompare.py
z[ \t\n][ \t\n]+c<00>(<00><01><00>jd|<00>S)N<> )<01>sub)<02>v<>_norm_whitespace_res <20>r7<00>norm_whitespacez$compare_xml.<locals>.norm_whitespace<63>s<00><><00>"<22>&<26>&<26>s<EFBFBD>A<EFBFBD>.<2E>.r9c<00>F<00>djd<02>|jD<00><00>S)N<>c3<00>pK<00>|].}|jtjk(s<01>!|j<00><01><00>0y<00>wr3)<04>nodeTyper <00> TEXT_NODE<44>data)rZ<00>cs r7r\z2compare_xml.<locals>.child_text.<locals>.<genexpr><3E>s(<00><00><><00>
<EFBFBD>.<2E>q<EFBFBD>!<21>*<2A>*<2A><04><0E><0E>2N<32>A<EFBFBD>F<EFBFBD>F<EFBFBD>.<2E>s<00>"6<01>6)r<><00>
childNodes<EFBFBD><01>elements r7<00>
child_textzcompare_xml.<locals>.child_text<78>s&<00><00><11>w<EFBFBD>w<EFBFBD>
<EFBFBD>#<23>.<2E>.<2E>
<EFBFBD>
<EFBFBD>
r9c<00>|<00>|jD<00>cgc]"}|jtjk(s<01>!|<01><02>$c}Scc}wr3)rOrKr <00> ELEMENT_NODE)rQrNs r7<00>childrenzcompare_xml.<locals>.children<65>s3<00><00>"<22>-<2D>-<2D>Q<>-<2D>a<EFBFBD><11><1A><1A>t<EFBFBD>?P<>?P<>1P<31><01>-<2D>Q<>Q<><51>Qs<00>"9<04>9c<00> <00><02><00><00>|<00><00>Sr3rH)rQrRrGs <20><>r7<00>norm_child_textz$compare_xml.<locals>.norm_child_text<78>s<00><><00><1E>z<EFBFBD>'<27>2<>3<>3r9c<00>H<00>t|jj<00><00>Sr3)r<><00>
attributesr<EFBFBD>rPs r7<00>
attrs_dictzcompare_xml.<locals>.attrs_dict<63>s<00><00><13>G<EFBFBD>&<26>&<26>,<2C>,<2C>.<2E>/<2F>/r9c<00> <00><04>|j|jk7ry<00>|<00><00>|<01>k7ry<00>|<00><00>|<01>k7ry<00>|<00>}<00>|<01>}t|<02>t|<03>k7ryt<00>fd<02>t||<03>D<00><00>S)NFc3<00>6<00>K<00>|]\}}<00>||<02><00><01><00>y<00>wr3rH)rZ<00>want<6E>got<6F> check_elements <20>r7r\z5compare_xml.<locals>.check_element.<locals>.<genexpr><3E>s!<00><><00><><00>
<EFBFBD>6V<EFBFBD><19><14>s<EFBFBD>M<EFBFBD>$<24><03> $<24>6V<36>s<00>)<04>tagNamer<65><00>all<6C>zip)<08> want_element<6E> got_element<6E> want_children<65> got_childrenrZr_rUrWs <20><><EFBFBD><EFBFBD>r7r_z"compare_xml.<locals>.check_element<6E>s<><00><><00> <17> <1F> <1F>;<3B>#6<>#6<> 6<><18> <1A><<3C> (<28>O<EFBFBD>K<EFBFBD>,H<> H<><18> <15>l<EFBFBD> #<23>z<EFBFBD>+<2B>'><3E> ><3E><18> <20><1C>.<2E> <0A><1F> <0B>,<2C> <0C> <0E>}<7D> <1D><13>\<5C>!2<> 2<><18><12>
<EFBFBD>69<EFBFBD>-<2D><1C>6V<36>
<EFBFBD>
<EFBFBD>
r9c<00><><00>|jD]A}|jtjtjtj
fvs<01>?|cSyr3)rOrKr <00> COMMENT_NODE<44>DOCUMENT_TYPE_NODE<44>PROCESSING_INSTRUCTION_NODE)<02>document<6E>nodes r7<00>
first_nodezcompare_xml.<locals>.first_node<64>sE<00><00><1C>'<27>'<27>D<EFBFBD><13>}<7D>}<7D><14>!<21>!<21><14>'<27>'<27><14>0<>0<>%<0E><0E>
<1C> <0B> (r9z\n<>
z<?xmlz<root>%s</root>)<06>re<72>compile<6C>strip<69>replace<63>
startswithr ) r]r^rm<00>wrapper<65> want_root<6F>got_rootrFrZr_rRrUrWrGs @@@@@@@r7<00> compare_xmlrwzs<><00><><00><1D>*<2A>*<2A>%7<>8<><17>/<2F>
<EFBFBD>
R<01>4<>0<> 
<EFBFBD><1C> <10>:<3A>:<3A><<3C> <1F> <1F><05>t<EFBFBD> ,<2C>D<EFBFBD>
<0A>)<29>)<29>+<2B>
<1D>
<1D>e<EFBFBD>T<EFBFBD>
*<2A>C<EFBFBD> <10>?<3F>?<3F>7<EFBFBD> #<23>#<23><07><16><14>~<7E><04><15><03>m<EFBFBD><03><1B>;<3B>t<EFBFBD>,<2C>-<2D>I<EFBFBD><19>+<2B>c<EFBFBD>*<2A>+<2B>H<EFBFBD> <18><19>H<EFBFBD> -<2D>-r9c<00>D<00>eZdZdZd<02>Zd<03>Zd<04>Zd<05>Zed<06><00>Z d<07>Z
d<08>Z y )
r%zU
Context manager that captures queries executed by the specified connection.
c<00><00>||_yr3)r<>)r6r<>s r7r8zCaptureQueriesContext.__init__<5F>s <00><00>$<24><04>r9c<00>,<00>t|j<00>Sr3)<02>iter<65>captured_queriesr<s r7<00>__iter__zCaptureQueriesContext.__iter__<5F>s<00><00><13>D<EFBFBD>)<29>)<29>*<2A>*r9c<00> <00>|j|Sr3)r|)r6r<>s r7rOz!CaptureQueriesContext.__getitem__<5F>s<00><00><13>$<24>$<24>U<EFBFBD>+<2B>+r9c<00>,<00>t|j<00>Sr3)r<>r|r<s r7<00>__len__zCaptureQueriesContext.__len__<5F>s<00><00><12>4<EFBFBD>(<28>(<28>)<29>)r9c<00>\<00>|jj|j|jSr3)r<><00>queries<65>initial_queries<65> final_queriesr<s r7r|z&CaptureQueriesContext.captured_queries<65>s%<00><00><13><EFBFBD><EFBFBD>&<26>&<26>t<EFBFBD>';<3B>';<3B>d<EFBFBD>>P<>>P<>Q<>Qr9c<00><00>|jj|_d|j_|jj<00>t|jj<00>|_d|_tjt<00>|S)NT)
r<EFBFBD>r<><00>ensure_connectionr<6E><00> queries_logr<67>r<>r<00>
disconnectrr<s r7r<>zCaptureQueriesContext.__enter__<5F>sd<00><00>"&<26>/<2F>/<2F>"D<>"D<><04><1F>-1<><04><0F><0F>*<2A> <0A><0F><0F>)<29>)<29>+<2B>"<22>4<EFBFBD>?<3F>?<3F>#><3E>#><3E>?<3F><04><1C>!<21><04><1A><17>"<22>"<22>=<3D>1<><13> r9c<00><><00>|j|j_tjt<00>|<01>yt |jj <00>|_yr3)r<>r<>r<00>connectrr<>r<>r<>r<>s r7r<>zCaptureQueriesContext.__exit__<5F>sB<00><00>-1<>-D<>-D<><04><0F><0F>*<2A><17><1F><1F> <0A>.<2E> <13> <1F> <12> <20><14><1F><1F>!<<3C>!<<3C>=<3D><04>r9N) rErFrGr`r8r}rOr<><00>propertyr|r<>r<>rHr9r7r%r%<00>s;<00><00><08>%<25>+<2B>,<2C>*<2A><0E>R<01><0E>R<01> <14>>r9r%c<00>*<00><00>eZdZ<02>fd<01>Zd<02>Zd<03>Z<05>xZS)r&c <00><><00><01>||_d|jvsd|jvrtj|_ntj|_t
<00>|<00><00>y)N<>message<67>module)<07> ignore_kwargs<67>warnings<67>filterwarnings<67> filter_func<6E> simplefilterrNr8rs <20>r7r8zignore_warnings.__init__<5F>sM<00><><00>#<23><04><1A> <14><04>*<2A>*<2A> *<2A>h<EFBFBD>$<24>:L<>:L<>.L<>'<27>6<>6<>D<EFBFBD> <1C>'<27>4<>4<>D<EFBFBD> <1C> <0A><07><18>r9c<00><><00>tj<00>|_|jj<00>|jdi|j<00><01>y)N)<01>ignore)r<><00>catch_warningsr<73>r<>r<>r<s r7r<>zignore_warnings.enable<6C>s><00><00>&<26>5<>5<>7<><04><1B> <0C><1B><1B>%<25>%<25>'<27><18><04><18><18>8<>T<EFBFBD>%7<>%7<>8r9c<00>Z<00>|jjtj<00><00>yr3)r<>r<><00>sys<79>exc_infor<s r7r<>zignore_warnings.disable<6C>s<00><00>$<24><04><1B><1B>$<24>$<24>c<EFBFBD>l<EFBFBD>l<EFBFBD>n<EFBFBD>5r9)rErFrGr8r<>r<>rarbs@r7r&r&<00>s<00><><00><1B>9<>
6r9r&z|This test relies on the ability to run a program in an arbitrary time zone, but your operating system isn't able to do that.c'<00><>K<00>tjdd}tjj|<00> d<01><02>|t_y#|t_wxYw<01>w)z5Context manager to temporarily add paths to sys.path.N)r<><00>pathr)<02>paths<68>_orig_sys_paths r7<00>extend_sys_pathr<68>s;<00><00><><00><19>X<EFBFBD>X<EFBFBD>a<EFBFBD>[<5B>N<EFBFBD><07>H<EFBFBD>H<EFBFBD>O<EFBFBD>O<EFBFBD>E<EFBFBD><1A>"<22> <0A>!<21><03><08><>><3E><03><08>s<00>3A<01>A<00> A<01> A<03>Ac#<00><>K<00>|j<00> d<01><02>|j<00>y#|j<00>wxYw<01>w)z?Clear the cache of an LRU cache object on entering and exiting.N)<01> cache_clear)<01>lru_cache_objects r7r"r"s5<00><00><><00><15> <20> <20>"<22>'<27> <0A><18>$<24>$<24>&<26><><18>$<24>$<24>&<26>s<00>><01>)<00>><01>;<03>>c#<00><>K<00>tt|<00>}tt|t<00><00> tt|<00><00><02>tt||<01>y#tt||<01>wxYw<01>w)aReturn a context manager used by captured_stdout/stdin/stderr
that temporarily replaces the sys stream *stream_name* with a StringIO.
Note: This function and the following ``captured_std*`` are copied
from CPython's ``test.support`` module.N)r<>r<>r<>r)<02> stream_name<6D> orig_stdouts r7<00>captured_outputr<74>sL<00><00><><00><1A>#<23>{<7B>+<2B>K<EFBFBD> <0B>C<EFBFBD><1B>h<EFBFBD>j<EFBFBD>)<29>/<2F><15>c<EFBFBD>;<3B>'<27>'<27><0F><03>[<5B>+<2B>.<2E><><07><03>[<5B>+<2B>.<2E>s<00>*A'<01>A<00>A'<01>A$<03>$A'c<00><00>td<01>S)z<>Capture the output of sys.stdout:
with captured_stdout() as stdout:
print("hello")
self.assertEqual(stdout.getvalue(), "hello
")
<20>stdout<75>r<>rHr9r7<00>captured_stdoutr<74>)<00><00><00> <1B>8<EFBFBD> $<24>$r9c<00><00>td<01>S)z<>Capture the output of sys.stderr:
with captured_stderr() as stderr:
print("hello", file=sys.stderr)
self.assertEqual(stderr.getvalue(), "hello
")
<20>stderrr<72>rHr9r7<00>captured_stderrr<72>3r<>r9c<00><00>td<01>S)z<>Capture the input to sys.stdin:
with captured_stdin() as stdin:
stdin.write('hello
')
stdin.seek(0)
# call test code that consumes from sys.stdin
captured = input()
self.assertEqual(captured, "hello")
<20>stdinr<6E>rHr9r7<00>captured_stdinr<6E>=s<00><00> <1B>7<EFBFBD> #<23>#r9c#<00><><00>K<00>tj}<01>fd<01>t_ d<02><02>|t_y#|t_wxYw<01>w)aM
Context manager to temporarily freeze time.time(). This temporarily
modifies the time function of the time module. Modules which import the
time function directly (e.g. `from time import time`) won't be affected
This isn't meant as a public API, but helps reduce some repetitive code in
Django's test suite.
c<00><00><01><00>Sr3rH)<01>ts<00>r7<00><lambda>zfreeze_time.<locals>.<lambda>Ts<00><><00>r9N)<01>time)r<><00>
_real_times` r7<00> freeze_timer<65>Js/<00><><00><><00><16><19><19>J<EFBFBD><19>D<EFBFBD>I<EFBFBD><1F> <0A><1E><04> <09><>J<EFBFBD><04> <09>s<00>A<01>3<00> A<01> A<03>Ac<00>l<00>ttdud<02>|<00>}tddd<05>ddddid<08>g<02> <09>|<00>S)
z<EFBFBD>
Decorator to enable a Jinja2 template engine in addition to the regular
Django template engine for a test or skip it if Jinja2 isn't available.
Nzthis test requires jinja2z/django.template.backends.django.DjangoTemplatesT)<02>BACKEND<4E>APP_DIRSz&django.template.backends.jinja2.Jinja2<61>keep_trailing_newline)r<>r<><00>OPTIONS)<01> TEMPLATES)r <00>jinja2r))r s r7<00>require_jinja2r<32>[sb<00><00>
D<01><06>v<EFBFBD><14>~<7E>'B<>C<>I<EFBFBD>N<>I<EFBFBD> <06> <1C>M<01> <20> <0E>
D<01> <20>3<>T<EFBFBD>:<3A> <0E>

<EFBFBD> <06><10> <11> r9c<00>.<00><00>eZdZdZ<03>fd<02>Zd<03>Zd<04>Z<06>xZS)<05>override_script_prefixzEDecorator or context manager to temporary override the script prefix.c<00>0<00><01>||_t<00>|<00> <00>yr3)<03>prefixrNr8)r6r<>rRs <20>r7r8zoverride_script_prefix.__init__ss<00><><00><1C><04> <0B> <0A><07><18>r9c<00>L<00>t<00>|_t|j<00>yr3)r<00>
old_prefixrr<>r<s r7r<>zoverride_script_prefix.enablews<00><00>+<2B>-<2D><04><0F><19>$<24>+<2B>+<2B>&r9c<00>.<00>t|j<00>yr3)rr<>r<s r7r<>zoverride_script_prefix.disable{s<00><00><19>$<24>/<2F>/<2F>*r9r@rbs@r7r<>r<>ps<00><><00>O<><1B>'<27>+r9r<>c<00><00>eZdZdZd<02>Zd<03>Zy)<05>LoggingCaptureMixinzn
Capture the output from the 'django' logger and store it on the class's
logger_output attribute.
c<00><><00>tjd<01>|_|jjdj|_t <00>|_|j|jjd_y)N<>djangor)<08>logging<6E> getLogger<65>logger<65>handlers<72>stream<61>
old_streamr<00> logger_outputr<s r7r<>zLoggingCaptureMixin.setUp<55>sW<00><00><1D>'<27>'<27><08>1<><04> <0B><1E>+<2B>+<2B>.<2E>.<2E>q<EFBFBD>1<>8<>8<><04><0F>%<25>Z<EFBFBD><04><1A>)-<2D>);<3B>);<3B><04> <0B> <0B><1C><1C>Q<EFBFBD><1F>&r9c<00>T<00>|j|jjd_yr?)r<>r<>r<>r<>r<s r7<00>tearDownzLoggingCaptureMixin.tearDown<77>s<00><00>)-<2D><1F><1F><04> <0B> <0B><1C><1C>Q<EFBFBD><1F>&r9N)rErFrGr`r<>r<>rHr9r7r<>r<>s<00><00><08>
<<3C> 9r9r<>c<00>.<00><00>eZdZdZ<03>fd<02>Zd<03>Zd<04>Z<06>xZS)r'a
Act as either a decorator or a context manager to register models defined
in its wrapped context to an isolated registry.
The list of installed apps the isolated registry should contain must be
passed as arguments.
Two optional keyword arguments can be specified:
`attr_name`: attribute assigned the isolated registry if used as a class
decorator.
`kwarg_name`: keyword argument passing the isolated registry if used as a
function decorator.
c<00>2<00><01>||_t<00>|<00>di|<02><01>y)NrH)<03>installed_appsrNr8)r6r<>r<>rRs <20>r7r8zisolate_apps.__init__<5F>s<00><><00>,<2C><04><1B> <0A><07><18>"<22>6<EFBFBD>"r9c<00>|<00>tj|_t|j<00>}t td|<01>|S<00>N<> default_apps)rr<><00>old_appsrr<>r<>)r6rs r7r<>zisolate_apps.enable<6C>s0<00><00><1F>,<2C>,<2C><04> <0A><13>D<EFBFBD>'<27>'<27>(<28><04><0F><07><1E><14>.<2E><13> r9c<00>:<00>ttd|j<00>yr<>)r<>rr<>r<s r7r<>zisolate_apps.disable<6C>s<00><00><0F><07><1E><14><1D><1D>7r9r@rbs@r7r'r'<00>s<00><><00><08> #<23><14> 8r9r'c<00>(<00>eZdZd<01>Zed<02><00>Zd<03>Zy)<05>
TimeKeeperc<00>@<00>tjt<00>|_yr3)<04> collections<6E> defaultdictr)<00>recordsr<s r7r8zTimeKeeper.__init__<5F>s<00><00>"<22>.<2E>.<2E>t<EFBFBD>4<><04> r9c#<00>:K<00>|j|tj<00>} d<00><02>tj<00>|z
}|j|j|<03>y#tj<00>|z
}|j|j|<03>wxYw<01>wr3)r<>r<><00> perf_counterr<72>)r6r/<00>
start_time<EFBFBD>end_times r7r<>zTimeKeeper.timed<65>s<00><00><><00> <0C> <0C> <0C>T<EFBFBD><1A><19>&<26>&<26>(<28>
<EFBFBD> 0<> <11><1B>(<28>(<28>*<2A>Z<EFBFBD>7<>H<EFBFBD> <10>L<EFBFBD>L<EFBFBD><14> <1E> %<25> %<25>h<EFBFBD> /<2F><><1C>(<28>(<28>*<2A>Z<EFBFBD>7<>H<EFBFBD> <10>L<EFBFBD>L<EFBFBD><14> <1E> %<25> %<25>h<EFBFBD> /<2F>s<00>$B<01>A!<00>6B<01>!7B<03>Bc<00><><00>|jj<00>D]C\}}|D]9}d||fz}tjj |t
j z<00><00>;<00>Ey)Nz %s took %.3fs)r<>r<>r<>r<><00>write<74>os<6F>linesep)r6r/<00> end_times<65> record_time<6D>records r7<00> print_resultszTimeKeeper.print_results<74>sQ<00><00>#<23>|<7C>|<7C>1<>1<>3<>O<EFBFBD>D<EFBFBD>)<29>(<28> <0B>(<28>D<EFBFBD>+<2B>+><3E>><3E><06><13>
<EFBFBD>
<EFBFBD> <20> <20><16>"<22>*<2A>*<2A>!4<>5<> )<29> 4r9N)rErFrGr8rr<>r<>rHr9r7r<>r<><00>s <00><00>5<><14>0<><14>0<>6r9r<>c<00>"<00>eZdZed<01><00>Zd<02>Zy)r<>c#<00>K<00>d<00><01>y<00>wr3rH)r6r/s r7r<>zNullTimeKeeper.timed<65>s <00><00><><00> <0A>s<00>c<00><00>yr3rHr<s r7r<>zNullTimeKeeper.print_results<74>s<00><00> r9N)rErFrGrr<>r<>rHr9r7r<>r<><00>s<00><00><13><0E><14><0E> r9r<>c<00><00><00><00>fd<01>}|S)z0Decorator to add tags to a test class or method.c<00><><00><01>t|d<01>r"|jj<00><01>|_|St|dt <00><01><00>|S)Nr8)rpr8<00>unionr<6E>r])<02>objr8s <20>r7<00> decoratorztag.<locals>.decorator<6F>s?<00><><00> <12>3<EFBFBD><06> <1F><1A>x<EFBFBD>x<EFBFBD>~<7E>~<7E>d<EFBFBD>+<2B>C<EFBFBD>H<EFBFBD><13>
<EFBFBD> <14>C<EFBFBD><16><13>T<EFBFBD><19> +<2B><12>
r9rH)r8r<>s` r7r+r+<00>s<00><><00><13> <15>r9)<01> lookup_namec'<00><>K<00> |D]}|j||<01><00>d<01><02>|D]}|j||<01><00>y#|D]}|j||<01><00>wxYw<01>w)z<>
Context manager to temporarily register lookups on a model field using
lookup_name (or the lookup's lookup_name if not provided).
N)<02>register_lookup<75>_unregister_lookup)<04>fieldr<64><00>lookups<70>lookups r7r<>r<><00>s\<00><00><><00> :<3A><1D>F<EFBFBD> <11> !<21> !<21>&<26>+<2B> 6<><1E> <0A><1D>F<EFBFBD> <11> $<24> $<24>V<EFBFBD>[<5B> 9<><1E><>g<EFBFBD>F<EFBFBD> <11> $<24> $<24>V<EFBFBD>[<5B> 9<><1E>s<00>A<01>;<00>A<01>A<03>Ac<00>b<00>tj<00>trtj<00>yyr3)<03>gc<67>collectrrHr9r7r#r#<00>s<00><00><06>J<EFBFBD>J<EFBFBD>L<EFBFBD> <0B>
<EFBFBD>
<EFBFBD>
<EFBFBD> <0C> r9r3)rF)dr<64>r<>r<>r<>ror<>r<>r<><00>
contextlibr<00> functoolsr<00>ior<00> itertoolsr<00>typesr<00>unittestrr r
<00>xml.dom.minidomr r <00> asgiref.syncr <00> django.appsr<00>django.apps.registryr<00> django.confrr<00> django.corer<00>django.core.exceptionsr<00>django.core.signalsrr<00> django.dbrrr<00>django.db.models.optionsr<00>django.templater<00>django.test.signalsr<00> django.urlsrr<00>django.utils.translationr<00>django.utils.versionrr<><00> ImportError<6F>__all__rp<00>
TZ_SUPPORTr r)r!rjrlr.r/r-r<>r<>r<>r<>r$r<>r)r(r*rwr%r&r,r<>r"r<>r<>r<>r<>r<>r<>r<>r<>r'r<>r<>r+r<>r#rHr9r7<00><module>rs0<00><01><12> <09><0E> <09> <09>
<EFBFBD> <0B><0F>%<25><1B><17><1B>!<21>1<>1<>-<2D>,<2C><1C>%<25>4<><1C>7<>@<40>B<>B<>,<2C>$<24>1<><<3C>/<2F>%<25><12><11>
 <02><07>&<15>T<EFBFBD>7<EFBFBD> #<23>
<EFBFBD> S<01> S<01> V<01>$<24> V<01>F)<29> <09> <09>!<11>H <14>(<15> <10><13> <0E> <10><1B>I<15>X-<2D>*'"<22>T5,<2C>p M<01> /<2F>GO<01>GO<01>TR<13>,<2C>R<13>j/<19>'<27>/<19>dE<01>1<>E<01>>B.<2E>J%><3E>%><3E>P6<>*<2A>6<>.!<21><0E>B<01><02><13><10>"<22><10>"<22><10>'<27><10>'<27><10> /<2F><10> /<2F>%<25>%<25>
$<24><10> <1F><10> <1F> <11>* +<2B>1<> +<2B> 9<> 9<> 8<>'<27>8<>>6<>6<>* <0A> <0A>
<15><10>15<31> :<3A><10> :<3A><15><>K<13><12> <11>F<EFBFBD><12>s<00>0G<00>G<03> G