def testManyToManyConnection(self): avango.connect_fields(self.b, (self.a, [ "Field1", ("Field2", "Field3"), ("Field3", "Field2") ])) self.a.Field1.value = 1 self.a.Field2.value = 2 self.a.Field3.value = 3 self.assertEqual(1, self.b.Field1.value) self.assertEqual(3, self.b.Field2.value) self.assertEqual(2, self.b.Field3.value)
def testManyToManyConnection(self): avango.connect_fields( self.b, (self.a, ["Field1", ("Field2", "Field3"), ("Field3", "Field2")])) self.a.Field1.value = 1 self.a.Field2.value = 2 self.a.Field3.value = 3 self.assertEqual(1, self.b.Field1.value) self.assertEqual(3, self.b.Field2.value) self.assertEqual(2, self.b.Field3.value)
def testImplicitOneToOneConnection(self): avango.connect_fields(self.b, (self.a, ["Field1"])) self.a.Field1.value = 42 self.assertEqual(42, self.b.Field1.value)
def testImplicitOneToOneConnection(self): avango.connect_fields(self.b, (self.a, [ "Field1" ])) self.a.Field1.value = 42 self.assertEqual(42, self.b.Field1.value)