Ejemplo n.º 1
0
    def test_Sync(self):
        data1 = Data({'tag': "somedata"})
        data2 = ForeignData({})
        data2.Sync(data1.to_rx())

        for field in data2.fields:
            assert getattr(data1, field) == getattr(data2, field)
Ejemplo n.º 2
0
 def test_Sync (self):
     data1 = Data({'tag':"somedata"})
     data2 = ForeignData({})
     data2.Sync(data1.to_rx())
     
     for field in data2.fields:
         assert getattr(data1, field) == getattr(data2, field)
Ejemplo n.º 3
0
 def test_to_rx(self):
     data = Data({'tag': "somedata"})
     rx = data.to_rx(["tag", "otherattribute"])
     assert set(rx.keys()) == set(["tag", "otherattribute"])
     assert rx['tag'] == "somedata"
     assert rx['otherattribute'] is None
Ejemplo n.º 4
0
 def test_to_rx (self):
     data = Data({'tag':"somedata"})
     rx = data.to_rx(["tag", "otherattribute"])
     assert set(rx.keys()) == set(["tag", "otherattribute"])
     assert rx['tag'] == "somedata"
     assert rx['otherattribute'] is None