adding TestScripts class
Tony Mack [Tue, 13 May 2008 01:01:45 +0000 (01:01 +0000)]
qaapi/qa/TestScripts.py [new file with mode: 0644]

diff --git a/qaapi/qa/TestScripts.py b/qaapi/qa/TestScripts.py
new file mode 100644 (file)
index 0000000..57b767f
--- /dev/null
@@ -0,0 +1,21 @@
+import utils
+from Table import Table
+
+class TestScript(dict):
+
+    fields = {
+       'name': None,
+       'pre': None,
+       'args': None,
+       'post': None
+       }
+
+    def __init__(self, fields = {}):
+       dict.__init__(self, self.fields)
+       self.update(fields)
+
+class TestScripts(Table):
+    def __init__(self, scripts):
+       scriptlist = [Script(script) for script in scripts]
+       Table.__init__(self, scriptlist)    
+