
    _ff                     N    d dl Z d dlmZ d dlmZ d dlmZ  G d de          ZdS )    N)call_command)CommandError)TestCasec                   .    e Zd Zg dZd Zd Zd Zd ZdS )TestMtimeCacheCommand)z*CACHE*z*custom*z*066cd253eada.jsz*d728fc7f9301.jsz*8a0fed36c317.jsz	test.txt*c                 $    d | j         D             S )Nc                     g | ]}d |z  S )z--ignore=%s ).0patterns     S/var/www/html/env/lib/python3.11/site-packages/compressor/tests/test_mtime_cache.py
<listcomp>z8TestMtimeCacheCommand.default_ignore.<locals>.<listcomp>   s    OOOG'OOO    )exclusion_patternsselfs    r   default_ignorez$TestMtimeCacheCommand.default_ignore   s    OOt7NOOOOr   c                     |                      t                    5  t          d           d d d            d S # 1 swxY w Y   d S )Nmtime_cache)assertRaisesr   r   r   s    r   test_handle_no_argsz)TestMtimeCacheCommand.test_handle_no_args   s    |,, 	( 	('''	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	(s   8<<c                 N   t          j                    }|                     i           5  t          ddg|                                 R d|i d d d            n# 1 swxY w Y   |                                }|                     d|           |                     d|           d S )NCACHESr   z--addstdout*Deleted mtimes of 20 files from the cache."Added mtimes of 20 files to cache.)ioStringIOsettingsr   r   getvalueassertInr   outoutputs      r   test_handle_addz%TestMtimeCacheCommand.test_handle_add   s    kmm]]"]%% 	U 	UT$2E2E2G2GTTTPSTTT	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	U 	UBFKKK:FCCCCC   $AA!Ac                 N   t          j                    }|                     i           5  t          ddg|                                 R d|i d d d            n# 1 swxY w Y   |                                }|                     d|           |                     d|           d S )Nr   r   z--cleanr   r   r   )r   r   r    r   r   r!   r"   assertNotInr#   s      r   test_handle_cleanz'TestMtimeCacheCommand.test_handle_clean#   s    kmm]]"]%% 	W 	W	VD4G4G4I4IVVVRUVVV	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	W 	WBFKKK=vFFFFFr'   N)__name__
__module____qualname__r   r   r   r&   r*   r
   r   r   r   r      sm          P P P( ( (D D DG G G G Gr   r   )r   django.core.managementr   django.core.management.baser   django.testr   r   r
   r   r   <module>r1      s    				 / / / / / / 4 4 4 4 4 4            !G !G !G !G !GH !G !G !G !G !Gr   