
2!V_                 @   s   d  d l  m Z d  d l m Z d  d l m Z d  d l Z d  d l Z d  d l Z	 d  d l
 m Z d d   Z d d	   Z Gd
 d   d e  Z d S)    )TestCase)override_settings)settingsN)reloadc             C   s   d d   |  D S)Nc             S   s"   g  |  ] } | d  k r |  q S)zdjango.contrib.staticfiles ).0xr   r   H/tmp/pip-build-0sboevxh/django-compressor/compressor/tests/test_utils.py
<listcomp>   s   	 z0get_apps_without_staticfiles.<locals>.<listcomp>r   )appsr   r   r	   get_apps_without_staticfiles   s    r   c             C   s   t  |   d g S)Nz1django.contrib.staticfiles.apps.StaticFilesConfig)r   )r   r   r   r	   )get_apps_with_staticfiles_using_appconfig   s    	r   c               @   s4   e  Z d  Z d d   Z d d   Z d d   Z d S)StaticFilesTestCasec             C   s)   |  j  t j j j t j j j k  d  S)N)
assertTrue
compressorutilsstaticfilesfindersdjangocontrib)selfr   r   r	   !test_has_finders_from_staticfiles   s    z5StaticFilesTestCase.test_has_finders_from_staticfilesc             C   sv   t  t j  } zO t d |  : t t j j  |  j t j j j	 t
 j j j	 k  Wd  QXWd  t t j j  Xd  S)NINSTALLED_APPS)r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r	   =test_has_finders_from_staticfiles_if_configured_per_appconfig   s    zQStaticFilesTestCase.test_has_finders_from_staticfiles_if_configured_per_appconfigc             C   sm   t  t j  } zF t d |  1 t t j j  |  j t j j j	 d  k  Wd  QXWd  t t j j  Xd  S)Nr   )
r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r	   4test_finders_is_none_if_staticfiles_is_not_installed'   s    &zHStaticFilesTestCase.test_finders_is_none_if_staticfiles_is_not_installedN)__name__
__module____qualname__r   r   r   r   r   r   r	   r      s   r   )Zdjango.testr   Zdjango.test.utilsr   Zdjango.confr   Z"django.contrib.staticfiles.findersr   Zcompressor.utils.staticfilesr   impr   r   r   r   r   r   r   r	   <module>   s   