o
    >h]                     @   s*   d Z ddlmZmZ G dd dejZdS )z
Receivers for use in tests.
    )baseipositioningc                   @   s(   e Zd ZdZdd Zdd Zdd ZdS )	MockPositioningReceivera  
    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                 C   s"   |    tjD ]}| | qd S )N)clearr   IPositioningReceiver_addCallback)self
methodName r
   /var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/twisted/positioning/test/receiver.py__init__   s   
z MockPositioningReceiver.__init__c                 C   s
   i | _ dS )zt
        Forget all the methods that have been called on this receiver, by
        emptying C{self.called}.
        Ncalled)r   r
   r
   r   r      s   
zMockPositioningReceiver.clearc                    s    fdd}t  | dS )zq
        Adds a callback of the given name, setting C{self.called[name]} to
        C{True} when called.
        c                     s   dj  < d S )NTr   )akwnamer   r
   r   callback*   s   z6MockPositioningReceiver._addCallback.<locals>.callbackN)setattr)r   r   r   r
   r   r   r   $   s   z$MockPositioningReceiver._addCallbackN)__name__
__module____qualname____doc__r   r   r   r
   r
   r
   r   r      s
    r   N)r   twisted.positioningr   r   BasePositioningReceiverr   r
   r
   r
   r   <module>   s   