Ë
    ¸2Úi¡  ã                   ój   — d dl mZ ddlmZ ddlmZ  G d„ de«      Z G d„ d	e«      Z G d
„ de«      Zy)é    )Úmodelsé   )ÚSafeDeleteModelé   )ÚSafeDeleteTestCasec                   ó   — e Zd Zy)ÚPrefetchBrotherN)Ú__name__Ú
__module__Ú__qualname__© ó    ú]/var/www/html/acx/venv/lib/python3.12/site-packages/safedelete/tests/test_prefetch_related.pyr	   r	      s   „ Ør   r	   c                   óJ   — e Zd Z ej                  edej                  ¬«      Zy)ÚPrefetchSisterÚsisters)Úrelated_nameÚ	on_deleteN)r
   r   r   r   Ú
ForeignKeyr	   ÚCASCADEÚsiblingr   r   r   r   r      s!   „ Øˆf×ÑØØØ—.‘.ô�Gr   r   c                   ó   — e Zd Zd„ Zd„ Zd„ Zy)ÚPrefetchTestCasec                 óÐ  — t         j                  j                  «       }t         j                  j                  «       }t        j                  j                  |¬«       t        j                  j                  |¬«       t        j                  j                  |¬«       t        j                  j                  |¬«      j	                  «        t        j                  j                  |¬«       t        j                  j                  |¬«       t        j                  j                  |¬«      j	                  «        t        j                  j                  |¬«      j	                  «        y )N)r   )r	   ÚobjectsÚcreater   Údelete)ÚselfÚbrother1Úbrother2s      r   ÚsetUpzPrefetchTestCase.setUp   sý   € Ü"×*Ñ*×1Ñ1Ó3ˆÜ"×*Ñ*×1Ñ1Ó3ˆä×Ñ×%Ñ%¨hÐ%Ô7Ü×Ñ×%Ñ%¨hÐ%Ô7Ü×Ñ×%Ñ%¨hÐ%Ô7Ü×Ñ×%Ñ%¨hÐ%Ó7×>Ñ>Ô@Ü×Ñ×%Ñ%¨hÐ%Ô7Ü×Ñ×%Ñ%¨hÐ%Ô7Ü×Ñ×%Ñ%¨hÐ%Ó7×>Ñ>Ô@Ü×Ñ×%Ñ%¨hÐ%Ó7×>Ñ>Õ@r   c           
      óÚ  — t         j                  j                  «       j                  d«      }t	        | d| j
                  «      }|D ]�  } ||j                  j                  «       j                  d«      t         j                  j                  |j                  ¬«      j                  j                  «       j                  d«      D �cg c]  }t        |«      ‘Œ c}t        «       ŒŸ yc c}w )zBprefetch_related() queryset should not be filtered by core_filter.r   ÚassertQuerySetEqualÚpk)r$   N)r	   r   ÚallÚprefetch_relatedÚgetattrÚassertQuerysetEqualr   Úorder_byÚgetr$   Úrepr)r   Úbrothersr#   ÚbrotherÚss        r   Útest_prefetch_relatedz&PrefetchTestCase.test_prefetch_related"   sÀ   € ä"×*Ñ*×.Ñ.Ó0×AÑAØó
ˆô & dÐ,AÀ4×C[ÑC[Ó\Ðàò 		ˆGÙØ—‘×#Ñ#Ó%×.Ñ.¨tÓ4ä%4×%<Ñ%<×%@Ñ%@Ø"Ÿ:™:ð &Aó &ç‘gŸc™c›e§H¡H¨T£NöØ !”D˜•Gòô
 õñ		ùòs   ÃC(c                 ó   — | j                  d«      5  t        j                  j                  «       j	                  d«      }|D ]%  }t        |j                  j                  «       «       Œ' 	 d d d «       y # 1 sw Y   y xY w)Nr   r   )ÚassertNumQueriesr	   r   r%   r&   Úlistr   )r   r,   r-   s      r   Ú'test_prefetch_related_is_evaluated_oncez8PrefetchTestCase.test_prefetch_related_is_evaluated_once5   sh   € Ø×"Ñ" 1Ó%ñ 	,Ü&×.Ñ.×2Ñ2Ó4×EÑEÀiÓPˆHØ#ò ,�Ü�W—_‘_×(Ñ(Ó*Õ+ñ,÷	,÷ 	,ñ 	,ús   ’AA4Á4A=N)r
   r   r   r!   r/   r3   r   r   r   r   r      s   „ òAòó&,r   r   N)Ú	django.dbr   r   Útestcaser   r	   r   r   r   r   r   ú<module>r6      s3   ðÝ å $Ý (ô	�oô 	ô�_ô ô&,Ð)õ &,r   