def test_create_endpoint_with_tuple(self): ep = SendingBaseEndpoint(node=Mock(spec=NodeB)) e = ep.create_endpoint(to_name=(sentinel.ex, sentinel.name)) self.assertIsInstance(e.channel.connect.call_args[0][0], NameTrio)
def test_create_endpoint_calls_connect(self): np = NameTrio(sentinel.xp, sentinel.queue) ep = SendingBaseEndpoint(node=Mock(spec=NodeB), to_name=np) e = ep.create_endpoint() e.channel.connect.assert_called_once_with(np)