
    h]                     B    S r SSKJrJr   " S S\R                  5      rg)z
Receivers for use in tests.
    )baseipositioningc                   *    \ rS rSrSrS rS rS rSrg)MockPositioningReceiver   z
A mock positioning receiver.

Mocks all the L{IPositioningReceiver} methods with stubs that don't do
anything but register that they were called.

@ivar called: A mapping of names of callbacks that have been called to
    C{True}.
@type called: C{dict}
c                 t    U R                  5         [        R                   H  nU R                  U5        M     g )N)clearr   IPositioningReceiver_addCallback)self
methodNames     h/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/positioning/test/receiver.py__init__ MockPositioningReceiver.__init__   s)    

&;;Jj) <    c                     0 U l         g)z\
Forget all the methods that have been called on this receiver, by
emptying C{self.called}.
Ncalled)r   s    r   r	   MockPositioningReceiver.clear   s    
 r   c                 0   ^ ^ UU 4S jn[        T TU5        g)zY
Adds a callback of the given name, setting C{self.called[name]} to
C{True} when called.
c                  $   > STR                   T'   g )NTr   )akwnamer   s     r   callback6MockPositioningReceiver._addCallback.<locals>.callback*   s     $DKKr   N)setattr)r   r   r   s   `` r   r   $MockPositioningReceiver._addCallback$   s    	% 	dH%r   r   N)	__name__
__module____qualname____firstlineno____doc__r   r	   r   __static_attributes__ r   r   r   r      s    	*	&r   r   N)r#   twisted.positioningr   r   BasePositioningReceiverr   r%   r   r   <module>r(      s!   
 3"&d:: "&r   