Beispiel #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)
Beispiel #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)
Beispiel #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
Beispiel #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