Exemplo n.º 1
0
    def test_target_parent_is_None_throws_error(self):
        class SubClass(self.testclass):
            def __init__(self):
                pass

        local = crest.Local(crest.Resource("dummy", crest.REAL), 12345)
        testentity = SubClass()

        with self.assertRaises(ValueError) as context:
            api.relay(my_relay=(testentity.sub1.port_in, local))

        self.assertEqual(
            str(context.exception),
            "Either the source or the target port are not inside an entity")
Exemplo n.º 2
0
 def __init__(self):
     api.relay(my_relay=(self.sub1.port_out, self.local2))
Exemplo n.º 3
0
 def __init__(self):
     api.relay(my_relay=(self.local, self.sub1.port_in))
Exemplo n.º 4
0
 def __init__(self):
     api.relay(my_relay=(self.local, self.local2))
Exemplo n.º 5
0
 def __init__(self):
     api.relay(my_relay=(self.sub1.port_out, self.state))
Exemplo n.º 6
0
 def __init__(self):
     api.relay(my_relay=(self.state, self.sub2.port_in))
Exemplo n.º 7
0
 def __init__(self):
     api.relay(my_relay=(self.sub1.port_out, self.sub2.port_in))
     api.relay(my_relay=(self.sub1.port_out2, self.sub2.port_in2))
Exemplo n.º 8
0
 def __init__(self):
     api.relay((self.sub1.port_out, self.sub2.port_in),
               (self.sub1.port_out, self.sub2.port_in))