[conduit: 114/138] Coverage for the test datatype too



commit 3a25c28b6ef199869f9a1d10b9cff96a3a78c866
Author: John Carr <john carr unrouted co uk>
Date:   Wed May 6 06:07:40 2009 -0700

    Coverage for the test datatype too
---
 test/soup/data/test.py |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/test/soup/data/test.py b/test/soup/data/test.py
new file mode 100644
index 0000000..f5b29ae
--- /dev/null
+++ b/test/soup/data/test.py
@@ -0,0 +1,21 @@
+import soup
+
+import conduit.utils as Utils
+from conduit.modules import TestModule
+
+import datetime
+
+class TestDataTypeWrapper(soup.data.DataWrapper):
+
+    wraps = TestModule.TestDataType
+
+    def iter_samples(self):
+        #FIXME: Would be nice to have some actual settings.
+        for i in range(5):
+            yield self.generate_sample()
+
+    def generate_sample(self):
+        t = TestModule.TestDataType(Utils.random_string())
+        t.set_mtime(datetime.datetime.now())
+        t.set_UID(Utils.random_string())
+        return t



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