/usr/lib/python3/dist-packages/twisted/positioning/test/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/positioning/test/__pycache__/receiver.cpython-310.pyc (1711B)
o
¯b] ã @ s* d Z ddlmZmZ G dd„ dejƒZdS )z
Receivers for use in tests.
é )ÚbaseÚipositioningc @ s( e Zd ZdZdd„ Zdd„ Zdd„ ZdS ) Ú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" | ¡ tjD ]}| |¡ qd S )N)Úclearr ÚIPositioningReceiverÚ_addCallback)ÚselfÚ
methodName© r
úC/usr/lib/python3/dist-packages/twisted/positioning/test/receiver.pyÚ__init__ s
ÿz MockPositioningReceiver.__init__c C s
i | _ dS )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
zMockPositioningReceiver.clearc s ‡ ‡fdd„}t ˆˆ |ƒ dS )zq
Adds a callback of the given name, setting C{self.called[name]} to
C{True} when called.
c s dˆj ˆ <