ó
P'—^c           @@  sÁ   d  d l  m Z d  d l m Z d  d l Z e j j d d ƒ d  d l m	 Z	 d  d l
 m Z m Z d  d l m Z d  d l m Z m Z d	 e f d
 „  ƒ  YZ e d e f d „  ƒ  Yƒ Z d S(   i    (   t   absolute_import(   t	   timedeltaNs   celery.task(   t   schedule(   t   periodic_taskt   PeriodicTask(   t   timedelta_seconds(   t   AppCaset   depends_on_current_appt	   test_Taskc           B@  s   e  Z d  „  Z RS(   c         C@  s«   d d l  m } d | f d „  ƒ  Y} |  j d t d t ƒ g } | j | ƒ |  j | j ƒ d d l m } d | f d „  ƒ  Y} | j | ƒ |  j | j ƒ Wd  QXd  S(	   Ni    (   t   Taskt   timkXc           B@  s   e  Z e Z RS(    (   t   __name__t
   __module__t   Truet   abstract(    (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyR
      s   t   set_as_currentt   accept_magic_kwargst   timkYc           B@  s   e  Z e Z RS(    (   R   R   R   R   (    (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyR   "   s   (	   t   celery.taskR	   t   Celeryt   FalseR   t   bindt   assertFalseR   t   celery(   t   selft   OldTaskR
   t   appt   NewTaskR   (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt-   test_base_task_inherits_magic_kwargs_from_app   s    (   R   R   R   (    (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyR      s   t   test_periodic_tasksc           B@  sG   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c      
   C@  sL   t  d |  j d t d t t d d ƒ d |  j ƒƒ d „  ƒ } | |  _ d  S(   NR   t   sharedt	   run_everyt   hoursi   c           S@  s   d  S(   N(    (    (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   my_periodic-   s    (   R   R   R   R   R   R!   (   R   R!   (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   setup,   s    *c         C@  s   |  j  j ƒ  S(   N(   R   t   now(   R   (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyR#   3   s    c      
   C@  s4   |  j  t ƒ  t d t f i t d 6ƒ Wd  QXd  S(   Nt   FooR   (   t   assertRaisest   NotImplementedErrort   typeR   R   (   R   (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   test_must_have_run_every6   s    c         C@  s8   |  j  j } |  j | j | j |  j ƒ  ƒ ƒ t ƒ d  S(   N(   R!   R   t   assertIsInstancet   remaining_estimatet   maybe_make_awareR#   R   (   R   t   s(    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   test_remaining_estimate:   s    c         C@  sB   |  j  j j |  j ƒ  ƒ \ } } |  j | ƒ |  j | d ƒ d  S(   Ni;   (   R!   R   t   is_dueR#   R   t   assertGreater(   R   t   duet	   remaining(    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   test_is_due_not_due@   s    !c         C@  s^   |  j  } | j j |  j ƒ  | j j ƒ \ } } |  j | ƒ |  j | t | j j ƒ ƒ d  S(   N(   R!   R   R.   R#   t
   assertTruet   assertEqualR   (   R   t   pR0   R1   (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   test_is_dueG   s    			c         C@  s#   |  j  } |  j t | j ƒ ƒ d  S(   N(   R!   R3   t   reprR   (   R   R5   (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   test_schedule_reprP   s    	(	   R   R   R"   R#   R(   R-   R2   R6   R8   (    (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyR   )   s   							(   t
   __future__R    t   datetimeR   t   syst   modulest   popt   Nonet   celery.schedulesR   R   R   R   t   celery.utils.timeutilsR   t   celery.tests.caseR   R   R   R   (    (    (    sI   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/compat_modules/test_compat.pyt   <module>   s   