Ϫf]BdZddlmZmZGddejZy)z Receivers for use in tests. )base ipositioningc"eZdZdZdZdZdZy)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} cp|jtjD]}|j|y)N)clearrIPositioningReceiver _addCallback)self methodNames C/usr/lib/python3/dist-packages/twisted/positioning/test/receiver.py__init__z MockPositioningReceiver.__init__s. &;; *J   j ) *ci|_y)zt Forget all the methods that have been called on this receiver, by emptying C{self.called}. Ncalled)r s r rzMockPositioningReceiver.clears  rc.fd}t|y)zq Adds a callback of the given name, setting C{self.called[name]} to C{True} when called. c$dj<y)NTr)akwnamer s r callbackz6MockPositioningReceiver._addCallback..callback*s $DKK rN)setattr)r rrs`` r r z$MockPositioningReceiver._addCallback$s  % dH%rN)__name__ __module__ __qualname____doc__rrr rr rr s *  &rrN)rtwisted.positioningrrBasePositioningReceiverrrrr r!s! 3"&d::"&r