def test_routing_call_property(self): s = ProcessSubscriber(process=sentinel.process, routing_call=sentinel.routing_call) self.assertEquals(s.routing_call, sentinel.routing_call) s.routing_call = sentinel.something_else self.assertEquals(s.routing_call, sentinel.something_else)
def test_init(self, mocks): s = ProcessSubscriber(process=sentinel.process, routing_call=sentinel.routing_call, kw1=sentinel.kw1, kw2=sentinel.kw2) self.assertEquals(s._process, sentinel.process) self.assertEquals(s._routing_call, sentinel.routing_call) mocks.assert_called_once_with(s, kw1=sentinel.kw1, kw2=sentinel.kw2)
def test_create_endpoint(self, mockce): s = ProcessSubscriber(process=sentinel.process, routing_call=sentinel.routing_call) ep = s.create_endpoint(kw=sentinel.kwarg) mockce.assert_called_once_with(ANY, process=sentinel.process, routing_call=sentinel.routing_call, kw=sentinel.kwarg)