ó
P'—^c           @@  sŠ  d  d l  m Z d  d l Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 m
 Z
 m Z d  d l m Z d  d l m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m  Z  d  d	 l! m" Z" m# Z# m$ Z$ m% Z% m& Z& d
 e" f d „  ƒ  YZ' d e" f d „  ƒ  YZ( d e" f d „  ƒ  YZ) d e" f d „  ƒ  YZ* d e" f d „  ƒ  YZ+ d e" f d „  ƒ  YZ, d e" f d „  ƒ  YZ- d e" f d „  ƒ  YZ. d e" f d „  ƒ  YZ/ d e" f d „  ƒ  YZ0 d e" f d „  ƒ  YZ1 d  e" f d! „  ƒ  YZ2 d" e" f d# „  ƒ  YZ3 d$ e" f d% „  ƒ  YZ4 d& e" f d' „  ƒ  YZ5 d( e" f d) „  ƒ  YZ6 d* e" f d+ „  ƒ  YZ7 d S(,   i    (   t   absolute_importN(   t   dumps(   t   datetime(   t   __main__(   t
   EX_FAILUREt   EX_USAGEt   EX_OK(   t   Error(   t   Commandt   list_t   callt   purget   resultt   inspectt   controlt   statust   migratet   helpt   reportt   CeleryCommandt   determine_exit_statust   multit   maint   _RemoteControlt   command(   t   AppCaset   Mockt
   WhateverIOt   override_stdoutst   patcht   test__main__c           B@  s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C@  sU   t  ƒ  F \ } } t j d ƒ |  j d | j ƒ  ƒ |  j d | j ƒ  ƒ Wd  QXd  S(   Ns   YADDA YADDAs   command is deprecated(   R   R   t   _warn_deprecatedt   assertInt   getvalue(   t   selft   stdoutt   _(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_warn_deprecated&   s    c      	   C@  sL   t  d ƒ : } t  d ƒ % } t j ƒ  | j ƒ  | j ƒ  Wd  QXWd  QXd  S(   Ns'   celery.__main__.maybe_patch_concurrencys   celery.bin.celery.main(   R   R   R   t   assert_called_with(   R"   t   mpcR   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt	   test_main,   s
    

c         C@  sn   t  d ƒ \ } t  d ƒ G } t  d ƒ 2 } t j ƒ  | j ƒ  | j d ƒ | j ƒ  Wd  QXWd  QXWd  QXd  S(   Ns'   celery.__main__.maybe_patch_concurrencys    celery.__main__._warn_deprecateds   celery.bin.worker.mains   celery worker(   R   R   t   _compat_workerR&   (   R"   R'   t   deprR   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_compat_worker3   s    

c         C@  st   t  d ƒ b } t  d ƒ M } t  d ƒ 8 } t j ƒ  |  j | j ƒ | j d ƒ | j ƒ  Wd  QXWd  QXWd  QXd  S(   Ns'   celery.__main__.maybe_patch_concurrencys    celery.__main__._warn_deprecateds   celery.bin.multi.mains   celery multi(   R   R   t   _compat_multit   assertFalset   calledR&   (   R"   R'   R*   R   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_compat_multi<   s    
c         C@  sn   t  d ƒ \ } t  d ƒ G } t  d ƒ 2 } t j ƒ  | j ƒ  | j d ƒ | j ƒ  Wd  QXWd  QXWd  QXd  S(   Ns'   celery.__main__.maybe_patch_concurrencys    celery.__main__._warn_deprecateds   celery.bin.beat.mains   celery beat(   R   R   t   _compat_beatR&   (   R"   R'   R*   R   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_compat_beatE   s    

(   t   __name__t
   __module__R%   R(   R+   R/   R1   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR   $   s
   						t   test_Commandc           B@  sY   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(	   c         C@  sC   t  d ƒ } |  j | j ƒ |  j | j ƒ |  j t | ƒ ƒ d  S(   Ns   something happened(   R   t   assertIsNotNoneR   t
   assertTruet   reasont   str(   R"   t   x(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_Error_reprQ   s    c         C@  s@   t  ƒ  |  _ t  ƒ  |  _ t |  j d |  j d |  j ƒ|  _ d  S(   NR#   t   stderr(   R   t   outt   errR   t   appt   cmd(   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   setupW   s    c         C@  s9   t  ƒ  |  j _ |  j j d ƒ |  j |  j j j ƒ d  S(   Nt   FOO(   R   R?   R<   t   errorR6   R.   (   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt
   test_error\   s    c         C@  s    t  ƒ  } |  j j d | ƒ d  S(   Nt   foo(   R   R?   R<   (   R"   t   f(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_outa   s    	c         C@  sZ   d „  } | |  j  _ |  j |  j  ƒ  t ƒ d „  } | |  j  _ |  j |  j  ƒ  t ƒ d  S(   Nc           S@  s   d  S(   N(    (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   ok_rung   s    c           S@  s   t  d t ƒ ‚ d  S(   NRB   (   R   R   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt	   error_runm   s    (   R?   t   runt   assertEqualR   R   (   R"   RG   RH   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt	   test_calle   s    		c         C@  s3   |  j  t ƒ  |  j j d d d g ƒ Wd  QXd  S(   Nt   progRD   t   bar(   t   assertRaisest   NotImplementedErrorR?   t   run_from_argv(   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_run_from_argvr   s    c         C@  sJ   |  j  |  j j g  ƒ d d ƒ |  j d |  j j d d g ƒ d ƒ d  S(   Ni   s	   - empty -RM   RD   (   RJ   R?   t   prettyR    (   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_pretty_listv   s     c         C@  s^   |  j  d t |  j j i d d 6ƒ d ƒ ƒ |  j  d t |  j j i d d 6ƒ d ƒ ƒ d  S(   Nt   OKs   the quick brown foxt   oki    t   ERRORRB   (   R    R8   R?   RR   (   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_pretty_dictz   s    $c         C@  st   |  j  d t |  j j d ƒ ƒ ƒ |  j  d t |  j j t ƒ  ƒ ƒ ƒ |  j  d t |  j j i d d 6ƒ ƒ ƒ d  S(   NRT   s   the quick brownRM   RD   (   R    R8   R?   RR   t   object(   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_pretty„   s    "%(   R2   R3   R:   R@   RC   RF   RK   RQ   RS   RW   RY   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR4   O   s   								
t	   test_listc           B@  s   e  Z d  „  Z d „  Z RS(   c         C@  sZ   t  d |  j d t ƒ  ƒ } t ƒ  } t ƒ  | j _ |  j t ƒ  | j	 | ƒ Wd  QXd  S(   NR>   R;   (
   R	   R>   R   R   RO   t   get_bindingst   side_effectRN   R   t   list_bindings(   R"   t   lt
   management(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_list_bindings_no_supportŒ   s
    	c         C@  sr   t  d |  j d t ƒ  ƒ } | j d ƒ |  j t ƒ  | j d  ƒ Wd  QX|  j t ƒ  | j d ƒ Wd  QXd  S(   NR>   R;   t   bindingsRD   (   R	   R>   R   RI   RN   R   t   None(   R"   R^   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_run“   s    (   R2   R3   R`   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRZ   Š   s   	RK   c           B@  s&   e  Z d  „  Z e d ƒ d „  ƒ Z RS(   c         C@  s+   |  j  j d t ƒ d „  ƒ } | |  _ d  S(   Nt   sharedc         S@  s   |  | S(   N(    (   R9   t   y(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   add¢   s    (   R>   t   taskt   FalseRf   (   R"   Rf   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR@       s    s    celery.app.base.Celery.send_taskc      	   C@  s¤  t  d |  j d t ƒ  d t ƒ  ƒ } | j |  j j ƒ |  j | j ƒ | j |  j j d t d d g ƒ d t i d d 6d d	 6ƒ ƒ|  j	 | j
 d
 d d d g ƒ |  j	 | j
 d
 d i d d 6d d	 6ƒ | j |  j j d d d d ƒ|  j	 | j
 d
 d d ƒ |  j	 | j
 d
 d d ƒ t j ƒ  } | j ƒ  } | j |  j j d | ƒ|  j	 | j
 d
 d | ƒ |  j t ƒ  | j |  j j d d ƒWd  QXd  S(   NR>   R;   R#   t   argsi   t   kwargsi   R9   Re   i   t   expiresi
   t	   countdownt   foobaribazibar(   R
   R>   R   RI   Rf   t   nameR6   R.   R   RJ   t	   call_argsR   t   nowt	   isoformatRN   t
   ValueError(   R"   t	   send_taskt   aRp   t   iso(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc   §   s"    $!)(   R2   R3   R@   R   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRK   ž   s   	t
   test_purgec           B@  s   e  Z e d  ƒ d „  ƒ Z RS(   s    celery.app.control.Control.purgec         C@  sƒ   t  ƒ  } t d |  j d | ƒ } d | _ | j d t ƒ |  j d | j ƒ  ƒ d | _ | j d t ƒ |  j d | j ƒ  ƒ d  S(   NR>   R#   i    t   forces   No messages purgedid   s   100 messages(   R   R   R>   t   return_valueRI   t   TrueR    R!   (   R"   t   purge_R<   Rt   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc   Á   s    			(   R2   R3   R   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRv   ¿   s   t   test_resultc           B@  s   e  Z d  „  Z d „  Z RS(   c         C@  s+   |  j  j d t ƒ d „  ƒ } | |  _ d  S(   NRd   c         S@  s   |  | S(   N(    (   R9   Re   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRf   Ò   s    (   R>   Rg   Rh   Rf   (   R"   Rf   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR@   Ð   s    c         C@  sî   t  d ƒ Ü } t ƒ  } t d |  j d | ƒ } d | _ | j d ƒ |  j d | j ƒ  ƒ d | _ | j d d |  j j	 ƒ|  j d | j ƒ  ƒ t  d ƒ B } | j d d |  j j	 d	 t
 ƒ|  j t | ƒ | j ƒ  ƒ Wd  QXWd  QXd  S(
   Ns   celery.result.AsyncResult.getR>   R#   t   Jerryt   idt   ElaineRg   s#   celery.result.AsyncResult.tracebackt	   traceback(   R   R   R   R>   Rx   RI   R    R!   Rf   Rn   Ry   R8   (   R"   t   getR<   t   rt   tb(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc   ×   s    			(   R2   R3   R@   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR{   Î   s   	t   test_statusc           B@  s   e  Z e d  ƒ d „  ƒ Z RS(   s   celery.bin.celery.inspectc         C@  s³   t  ƒ  t  ƒ  } } t ƒ  } | _ g  | j _ t |  j d | d | ƒ} |  j t ƒ  | j ƒ  Wd  QXd d d g | j _ | j ƒ  |  j d | j	 ƒ  ƒ | j d t
 ƒ d  S(   NR#   R;   Rt   t   bt   cs   3 nodes onlinet   quiet(   R   R   Rx   RI   R   R>   RN   R   R    R!   Ry   (   R"   t   inspect_R<   R=   t   inst   s(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc   ê   s    
(   R2   R3   R   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRƒ   è   s   t   test_migratec           B@  s   e  Z e d  ƒ d „  ƒ Z RS(   s$   celery.contrib.migrate.migrate_tasksc         C@  sÐ   t  ƒ  } t d |  j d | d t  ƒ  ƒ } |  j t ƒ  | j ƒ  Wd  QX|  j | j ƒ | j d d ƒ |  j | j ƒ t	 ƒ  } d | _
 d | _ | j | i d d	 6d
 d 6d  ƒ |  j d | j ƒ  ƒ d  S(   NR>   R#   R;   s   memory://foos   memory://bari
   i   s	   tasks.addRg   t   IDR}   s   10/30(   R   R   R>   RN   t	   TypeErrorRI   R-   R.   R6   R   t   countt   strtotalt   on_migrate_taskRb   R    R!   (   R"   t   migrate_tasksR<   t   mt   state(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc   û   s    	!			!(   R2   R3   R   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRŠ   ù   s   t   test_reportc           B@  s   e  Z d  „  Z RS(   c         C@  sN   t  ƒ  } t d |  j d | ƒ } |  j | j ƒ  t ƒ |  j | j ƒ  ƒ d  S(   NR>   R#   (   R   R   R>   RJ   RI   R   R6   R!   (   R"   R<   R   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc     s    	(   R2   R3   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR“     s   t	   test_helpc           B@  s   e  Z d  „  Z RS(   c         C@  s€   t  ƒ  } t d |  j d | ƒ } t ƒ  | _ |  j | j ƒ  t ƒ |  j | j	 ƒ  ƒ |  j | j
 d ƒ ƒ | j j j ƒ  d  S(   NR>   R#   R   (   R   R   R>   R   t   parserRJ   RI   R   R6   R!   t   usaget
   print_helpR&   (   R"   R<   t   h(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc     s    	(   R2   R3   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR”     s   t   test_CeleryCommandc           B@  sY   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(	   c         C@  s0  t  d |  j ƒ } t ƒ  | _ d | j _ |  j t ƒ  | j ƒ  Wd  QXt | j _ |  j t ƒ  | j ƒ  Wd  QXt	 ƒ  | j _
 |  j t ƒ  | j ƒ  Wd  QXt | _ |  j t ƒ  | j d d g ƒ Wd  QX|  j | j ƒ t | _ |  j t ƒ  | j d d d g ƒ Wd  QX|  j | j ƒ d  S(   NR>   i   t   celeryR   s	   manage.py(   R   R>   R   t   handle_argvRx   RN   t
   SystemExitt   execute_from_commandlineRy   t   KeyboardInterruptR\   t   respects_app_optionR-   (   R"   R9   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_execute_from_commandline$  s&    		c         C@  sm   t  d |  j ƒ } |  j | j d d g ƒ ƒ |  j | j d d g ƒ ƒ |  j | j d d d g ƒ ƒ d  S(   NR>   Rš   t   eventst   workers	   manage.py(   R   R>   t   assertIsNonet   with_pool_optionR6   (   R"   R9   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_with_pool_option<  s    c         C@  sW   t  d ƒ E } t d d ƒ } | _ d  | j _ t d |  j ƒ } | j ƒ  Wd  QXd  S(   Ns   celery.bin.celery.ExtensionsRn   t	   ExtensionR>   (   R   R   Rx   Rb   t   loadR   R>   t   load_extension_commands(   R"   t   Extt   extR9   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt    test_load_extensions_no_commandsB  s
    c         C@  s0   |  j  t d ƒ t ƒ |  j  t d ƒ t ƒ d  S(   Nt   truet    (   RJ   R   R   R   (   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_determine_exit_statusI  s    c      	   C@  sÔ   t  d |  j ƒ } |  j | j d  ƒ g  ƒ |  j | j d d d d d d g ƒ d d d d d d g ƒ |  j | j d d d d d d d g ƒ d d d d d d d g ƒ |  j | j d	 d
 g ƒ d	 d
 g ƒ d  S(   NR>   s   -lt   debugR¢   s   -ct   3s   --foos   --pool=geventRD   s   --foo=1(   R   R>   RJ   t   _relocate_args_from_startRb   (   R"   R9   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_relocate_args_from_startM  s    c         C@  sw   t  d |  j ƒ } t ƒ  | _ | j d g  ƒ | j j d d g ƒ | j d d d g ƒ | j j d d d g ƒ d  S(   NR>   Rš   R   t   startRD   (   R   R>   R   t   executeR›   R&   (   R"   R9   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_handle_argva  s    c         C@  s¡  t  d |  j ƒ } t ƒ  } | j d <t ƒ  } | _ | j d d g ƒ | j j | j g  d d ƒ| j	 ƒ  | j d d g ƒ | j j | j g  d d ƒt ƒ  } | j d <t ƒ  } | _ t
 d d d	 ƒ} | j _ t d
 d ƒ | _ | j	 ƒ  | j d d g ƒ | j j | ƒ | j j | j g  d d ƒ| j j | j g  d d ƒ| j d ƒ } | j _ t ƒ  | _ | j d d g ƒ | j j | ƒ d  S(   NR>   R   t   foooxRt   R   t   dummyRD   R   R   Rn   t   on_error(   R   R>   R   t   commandsRx   R´   RP   R&   t	   prog_namet   resetR   R\   R¸   t
   UsageErrort   on_usage_error(   R"   R9   t   HelpR   t   DummyR·   t   exc(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_executej  s0    

		c         C@  sm   t  d |  j ƒ } t ƒ  | _ | j | j d ƒ d d  ƒ|  j | j j ƒ | j | j d ƒ d d ƒd  S(   NR>   RD   R   R·   (	   R   R>   R   RB   R½   R¼   Rb   R6   R.   (   R"   R9   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_on_usage_error‰  s
    c         C@  s   t  d |  j ƒ } t d d ƒ } d | _ t j t j d | ƒ7 |  j | j	 d ƒ d ƒ |  j | j	 d ƒ d ƒ Wd  QXd  S(   NR>   Rn   R   s   /opt/foo.pys   __main__.pyRš   (
   R   R>   R   t   __file__R   t   dictt   syst   modulesRJ   t   prepare_prog_name(   R"   R9   R   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_prepare_prog_name  s    	(   R2   R3   R    R¥   R«   R®   R²   Rµ   RÁ   RÂ   RÈ   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR™   "  s   									t   test_RemoteControlc           B@  s   e  Z d  „  Z RS(   c         C@  s0   |  j  t ƒ  t d |  j ƒ j ƒ  Wd  QXd  S(   NR>   (   RN   RO   R   R>   R
   (   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_call_interface›  s    (   R2   R3   RÊ   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRÉ   ™  s   t   test_inspectc           B@  sS   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e d ƒ d „  ƒ Z	 RS(   c         C@  s&   |  j  t d |  j ƒ j d ƒ ƒ d  S(   NR>   RD   (   R6   R   R>   R–   (   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt
   test_usage¢  s    c         C@  s>   t  d |  j ƒ } |  j | j d d t d | j j ƒƒ d  S(   NR>   t   pingR   t   color(   R   R>   R6   t   get_command_infoRy   t   coloredt   red(   R"   t   i(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_command_info¥  s    c         C@  sZ   t  d |  j ƒ } |  j | j d t d | j j ƒ ƒ |  j | j d t d d  ƒ ƒ d  S(   NR>   R   RÎ   (	   R   R>   R6   t   list_commandsRy   RÐ   RÑ   Rh   Rb   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_list_commands_color«  s
    c         C@  s    |  j  t d |  j ƒ j ƒ d  S(   NR>   (   R6   R   R>   t   epilog(   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_epilog´  s    c         C@  sv   t  ƒ  |  j _ t  d d ƒ } |  j j _ d | j _ t d |  j ƒ } |  j | j ƒ  | j	 d g ƒ Wd  QXd  S(   NRn   t
   Connectiont   sqlR>   RÍ   (
   R   R>   t
   connectionRx   t	   transportt   driver_typeR   RN   R   t   do_call_method(   R"   t   connRÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt&   test_do_call_method_sql_transport_type·  s    c         C@  sª   t  |  j ƒ } t ƒ  | _ t | _ | j d d ƒ |  j | j j ƒ | j d d ƒ |  j	 | j j ƒ t
 | _ | j j ƒ  | j d d d ƒ |  j	 | j j ƒ d  S(   Ns   <-s	   hello outs   ->s   hello int   body(   R   R>   R   R<   Ry   R†   t   say_chatR-   R.   R6   Rh   t
   reset_mock(   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_say_directions¿  s    		s"   celery.app.control.Control.inspectc      	   C@  s¸  t  ƒ  } t d |  j d | ƒ } |  j t ƒ  | j ƒ  Wd  QX|  j t ƒ  | j d ƒ Wd  QX|  j t ƒ  | j d ƒ Wd  QX| j d ƒ |  j | j ƒ | j d d d ƒ|  j | j	 d d d	 d
 g ƒ |  j | j	 d d d ƒ | j	 d d } | i i d d 6d	 6ƒ |  j
 d | j ƒ  ƒ t ƒ  } | _ d  | j _ |  j t ƒ  | j d ƒ Wd  QX| j d ƒ | j ƒ  t | _ | j d d ƒ |  j | j ƒ  ƒ d  S(   NR>   R#   R   t   xyzzybazRÍ   t   destinations   foo,bari   RD   RM   t   timeoutgš™™™™™É?t   callbackt   pongRU   RT   i    s   <-t   hello(   R   R   R>   RN   R   RI   R6   R.   RJ   Ro   R    R!   R   Rx   Rb   RÍ   t   seekt   truncateRy   R†   Rá   R-   (   R"   t   realR<   RÒ   Rç   t   instance(    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRc   Î  s2    	!
	(
   R2   R3   RÌ   RÓ   RÕ   R×   Rß   Rã   R   Rc   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRË      s   							t   test_controlc           B@  sY   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(	   c         O@  sG   | j  d t d d ƒ ƒ t | | Ž  } | rC t d d ƒ | _ n  | S(   NR>   Rn   s   control.call(   t
   setdefaultR   R   R
   (   R"   t
   patch_callRi   Rj   R…   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR   ñ  s
    c         C@  sK   |  j  t ƒ } | j d d d d ƒ| j j  j j d d d d t ƒd  S(   NRD   i   t   kwi   t   reply(   R   Rh   R
   R>   RD   R&   Ry   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRK   ø  s    c         C@  s9   |  j  t ƒ } | j d d d ƒ| j j d d ƒ d  S(   Nt	   pool_growt   ni   (   R   Ry   Ró   R
   R&   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_pool_growý  s    c         C@  s9   |  j  t ƒ } | j d d d ƒ| j j d d ƒ d  S(   Nt   pool_shrinkRô   i   (   R   Ry   Rö   R
   R&   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_pool_shrink  s    c         C@  sB   |  j  t ƒ } | j d d d d d ƒ| j j d d d ƒ d  S(   Nt	   autoscalet   maxi   t   mini   (   R   Ry   Rø   R
   R&   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_autoscale  s    c         C@  s<   |  j  t ƒ } | j d d d ƒ | j j d d d ƒ d  S(   Nt
   rate_limits   proj.adds   1/s(   R   Ry   Rü   R
   R&   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_rate_limit  s    c         C@  sB   |  j  t ƒ } | j d d d d ƒ | j j d d d d ƒ d  S(   Nt
   time_limits   proj.addi
   i   (   R   Ry   Rþ   R
   R&   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_time_limit  s    c         C@  sT   |  j  t ƒ } | j d d d d d d t ƒ| j j d d d d d d t ƒd  S(   Nt   add_consumert   queuet   exchanget   topict   rkeyt   durable(   R   Ry   R   R
   R&   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_add_consumer  s    	c         C@  s6   |  j  t ƒ } | j d d ƒ | j j d d ƒ d  S(   Nt   cancel_consumerR  (   R   Ry   R  R
   R&   (   R"   RÒ   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_cancel_consumer!  s    (   R2   R3   R   RK   Rõ   R÷   Rû   Rý   Rÿ   R  R  (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRî   ï  s   								t
   test_multic           B@  s   e  Z d  „  Z d „  Z RS(   c         C@  s&   |  j  t d |  j ƒ j ƒ  d ƒ d  S(   NR>   (    (   t   assertTupleEqualR   R>   t   get_options(   R"   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_get_options)  s    c      	   C@  sd   t  d ƒ R } t ƒ  } | _ t |  j ƒ j d d g d d ƒ| j j d d g d ƒ Wd  QXd  S(   Ns   celery.bin.multi.MultiToolRš   t   argR   R   (   R   R   Rx   R   R>   RP   R   R&   (   R"   t	   MultiToolR‘   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyRQ   ,  s
    "	(   R2   R3   R  RQ   (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR	  '  s   	R(   c           B@  s2   e  Z e d  ƒ d „  ƒ Z e d  ƒ d „  ƒ Z RS(   s   celery.bin.celery.CeleryCommandc         C@  s+   t  ƒ  } | _ t ƒ  | j j d  ƒ d  S(   N(   R   Rx   t   mainfunR   R&   Rb   (   R"   R   R?   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR(   7  s    c         C@  s:   t  ƒ  } | _ t ƒ  | j _ t ƒ  | j j d  ƒ d  S(   N(   R   Rx   Rž   R   R\   R  R&   Rb   (   R"   R   R?   (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_main_KeyboardInterrupt=  s    (   R2   R3   R   R(   R  (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR(   5  s   t   test_compatc           B@  s   e  Z d  „  Z RS(   c         C@  sX   t  d ƒ F } |  j t ƒ  | j ƒ t d d ƒ } t | ƒ | j j | ƒ Wd  QXd  S(   Ns   celery.bin.celery.CeleryCommandRn   t   fun(   R   RJ   R   t   register_commandR   R&   (   R"   t   CCR  (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   test_compat_command_decoratorG  s
    
(   R2   R3   R  (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyR  E  s   (8   t
   __future__R    RÅ   t   anyjsonR   R   Rš   R   t   celery.platformsR   R   R   t   celery.bin.baseR   t   celery.bin.celeryR   R	   R
   R   R   R   R   R   R   R   R   R   R   R   R   R  R   R   t   celery.tests.caseR   R   R   R   R   R   R4   RZ   RK   Rv   R{   Rƒ   RŠ   R“   R”   R™   RÉ   RË   Rî   R	  R(   R  (    (    (    s>   /tmp/pip-unpacked-wheel-gV1wwp/celery/tests/bin/test_celery.pyt   <module>   s2   p(+;!	wO8