def test_update_routing_table_with_conversation_linked_to_itself(self): conv, router, tag = yield self._setup_routing_table() source = (u"CONVERSATION:%s:%s" % (conv.conversation_type, conv.key), u"default") endpoint_uuid = EndpointType.format_uuid(*source) routing_table = self.mk_routing_table([(source, source)]) d = self.proxy.callRemote("update_routing_table", self.campaign_key, routing_table) yield self.assert_faults( d, 400, u"Source inbound-receiving endpoint" " {u'uuid': %r} should link" " to an outbound-receiving endpoint but links to {u'uuid': %r}" % (endpoint_uuid, endpoint_uuid), )
def test_update_routing_table_with_channel_linked_to_itself(self): conv, router, tag = yield self._setup_routing_table() source = (u'TRANSPORT_TAG:pool:tag1', u'default') endpoint_uuid = EndpointType.format_uuid(*source) routing_table = self.mk_routing_table([ (source, source), ]) d = self.proxy.callRemote("update_routing_table", self.campaign_key, routing_table) yield self.assert_faults( d, 400, u"Source outbound-receiving endpoint" " {u'uuid': %r} should link" " to an inbound-receiving endpoint but links to {u'uuid':" " %r}" % (endpoint_uuid, endpoint_uuid))
def test_update_routing_table_with_channel_linked_to_itself(self): conv, router, tag = yield self._setup_routing_table() source = (u"TRANSPORT_TAG:pool:tag1", u"default") endpoint_uuid = EndpointType.format_uuid(*source) routing_table = self.mk_routing_table([(source, source)]) d = self.proxy.callRemote("update_routing_table", self.campaign_key, routing_table) yield self.assert_faults( d, 400, u"Source outbound-receiving endpoint" " {u'uuid': %r} should link" " to an inbound-receiving endpoint but links to {u'uuid':" " %r}" % (endpoint_uuid, endpoint_uuid), )
def test_update_routing_table_with_conversation_linked_to_itself(self): conv, router, tag = yield self._setup_routing_table() source = (u'CONVERSATION:%s:%s' % (conv.conversation_type, conv.key), u'default') endpoint_uuid = EndpointType.format_uuid(*source) routing_table = self.mk_routing_table([ (source, source), ]) d = self.proxy.callRemote("update_routing_table", self.campaign_key, routing_table) yield self.assert_faults( d, 400, u"Source inbound-receiving endpoint" " {u'uuid': %r} should link" " to an outbound-receiving endpoint but links to {u'uuid': %r}" % (endpoint_uuid, endpoint_uuid))
def test_format_uuid(self): uuid = EndpointType.format_uuid('foo', 'bar') self.assertEqual(uuid, u'foo::bar')
def test_format_uuid(self): uuid = EndpointType.format_uuid('foo', 'bar') self.assertEqual(uuid, u'foo::bar')