o ¯b]ã@s*dZddlmZmZGdd„dejƒZdS)z Receivers for use in tests. é)ÚbaseÚ ipositioningc@s(eZdZdZdd„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} cCs"| ¡tjD]}| |¡qdS)N)ÚclearrÚIPositioningReceiverÚ _addCallback)ÚselfÚ methodName©r úC/usr/lib/python3/dist-packages/twisted/positioning/test/receiver.pyÚ__init__s  ÿz MockPositioningReceiver.__init__cCs i|_dS)zt Forget all the methods that have been called on this receiver, by emptying C{self.called}. N©Úcalled)rr r r rs zMockPositioningReceiver.clearcs‡‡fdd„}tˆˆ|ƒdS)zq Adds a callback of the given name, setting C{self.called[name]} to C{True} when called. csdˆjˆ<dS)NTr )ÚaÚkw©Únamerr r Úcallback*sz6MockPositioningReceiver._addCallback..callbackN)Úsetattr)rrrr rr r$sz$MockPositioningReceiver._addCallbackN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrr r r r r s   rN)rÚtwisted.positioningrrÚBasePositioningReceiverrr r r r Ús