Exemplo n.º 1
0
 def test_create_router_connector_for_model(self):
     c = GoConnector.for_model(
         FakeRouter("rb_type_1", "12345"), GoConnector.INBOUND)
     self.assertEqual(c.ctype, GoConnector.ROUTER)
     self.assertEqual(c.router_type, "rb_type_1")
     self.assertEqual(c.router_key, "12345")
     self.assertEqual(c.direction, GoConnector.INBOUND)
     self.assertEqual(str(c), "ROUTER:rb_type_1:12345:INBOUND")
Exemplo n.º 2
0
 def test_create_router_connector_for_model(self):
     c = GoConnector.for_model(FakeRouter("rb_type_1", "12345"),
                               GoConnector.INBOUND)
     self.assertEqual(c.ctype, GoConnector.ROUTER)
     self.assertEqual(c.router_type, "rb_type_1")
     self.assertEqual(c.router_key, "12345")
     self.assertEqual(c.direction, GoConnector.INBOUND)
     self.assertEqual(str(c), "ROUTER:rb_type_1:12345:INBOUND")
Exemplo n.º 3
0
 def test_create_transport_tag_connector_for_model(self):
     c = GoConnector.for_model(FakePlasticChannel("tagpool_1", "tag_1"))
     self.assertEqual(c.ctype, GoConnector.TRANSPORT_TAG)
     self.assertEqual(c.tagpool, "tagpool_1")
     self.assertEqual(c.tagname, "tag_1")
     self.assertEqual(str(c), "TRANSPORT_TAG:tagpool_1:tag_1")
Exemplo n.º 4
0
 def test_create_conversation_connector_for_model(self):
     c = GoConnector.for_model(FakeConversation("conv_type_1", "12345"))
     self.assertEqual(c.ctype, GoConnector.CONVERSATION)
     self.assertEqual(c.conv_type, "conv_type_1")
     self.assertEqual(c.conv_key, "12345")
     self.assertEqual(str(c), "CONVERSATION:conv_type_1:12345")
Exemplo n.º 5
0
 def get_connector(self):
     return GoConnector.for_model(self)
Exemplo n.º 6
0
 def get_outbound_connector(self):
     return GoConnector.for_model(self, GoConnector.OUTBOUND)
Exemplo n.º 7
0
 def get_inbound_connector(self):
     return GoConnector.for_model(self, GoConnector.INBOUND)
Exemplo n.º 8
0
 def test_create_transport_tag_connector_for_model(self):
     c = GoConnector.for_model(FakePlasticChannel("tagpool_1", "tag_1"))
     self.assertEqual(c.ctype, GoConnector.TRANSPORT_TAG)
     self.assertEqual(c.tagpool, "tagpool_1")
     self.assertEqual(c.tagname, "tag_1")
     self.assertEqual(str(c), "TRANSPORT_TAG:tagpool_1:tag_1")
Exemplo n.º 9
0
 def get_connector(self):
     return GoConnector.for_model(self)
Exemplo n.º 10
0
 def test_create_conversation_connector_for_model(self):
     c = GoConnector.for_model(FakeConversation("conv_type_1", "12345"))
     self.assertEqual(c.ctype, GoConnector.CONVERSATION)
     self.assertEqual(c.conv_type, "conv_type_1")
     self.assertEqual(c.conv_key, "12345")
     self.assertEqual(str(c), "CONVERSATION:conv_type_1:12345")
Exemplo n.º 11
0
 def get_outbound_connector(self):
     return GoConnector.for_model(self, GoConnector.OUTBOUND)
Exemplo n.º 12
0
 def get_inbound_connector(self):
     return GoConnector.for_model(self, GoConnector.INBOUND)