[conduit: 72/138] Add 4 tests to see what happens when we modify data



commit 2d9082d10449a2fd04a22d892c1827ac664b86a3
Author: John Carr <john carr unrouted co uk>
Date:   Sun May 3 05:57:47 2009 -0700

    Add 4 tests to see what happens when we modify data
---
 test/soup/test_synchronization.py |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/test/soup/test_synchronization.py b/test/soup/test_synchronization.py
index 8452b87..846f21c 100644
--- a/test/soup/test_synchronization.py
+++ b/test/soup/test_synchronization.py
@@ -58,6 +58,21 @@ def make_testcase(src, src_data, snk, snk_data):
             added = self.add_testdata(self.source, self.source_data)
             self.pair.sync(block=True)
             self.check_state(added)
+            return added
+
+        def test_add_source_modify_source(self):
+            """ should be able to add data to source, sync, modify source, then sync """
+            added = self.test_add_to_source()
+            self.modify_testdata(self.source, self.source_data)
+            self.pair.sync(block=True)
+            self.check_state(added)
+
+        def test_add_source_modify_sink(self):
+            """ should be able to add data to source, sync, modify sink, then sync """
+            added = self.test_add_to_source()
+            self.modify_testdata(self.sink, self.sink_data)
+            self.pair.sync(block=True)
+            self.check_state(added)
 
         def test_add_source_delete_source(self):
             """ should be able to add data at source, sync, delete data from source then sync """
@@ -78,6 +93,21 @@ def make_testcase(src, src_data, snk, snk_data):
             added = self.add_testdata(self.sink, self.sink_data)
             self.pair.sync(block=True)
             self.check_state(added)
+            return added
+
+        def test_add_sink_modify_source(self):
+            """ should be able to add data to sink, sync, modify source, then sync """
+            added = self.test_add_to_sink()
+            self.modify_testdata(self.source, self.source_data)
+            self.pair.sync(block=True)
+            self.check_state(added)
+
+        def test_add_sink_modify_sink(self):
+            """ should be able to add data to sink, sync, modify sink, then sync """
+            added = self.test_add_to_sink()
+            self.modify_testdata(self.sink, self.sink_data)
+            self.pair.sync(block=True)
+            self.check_state(added)
 
         def test_add_sink_delete_source(self):
             """ should be able to add data at sink, sync, delete at source, then sync """



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]