method that deletes test objects defined in config file qa_config
authorTony Mack <tmack@cs.princeton.edu>
Thu, 17 Jan 2008 21:29:20 +0000 (21:29 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Thu, 17 Jan 2008 21:29:20 +0000 (21:29 +0000)
qaapi/qa/modules/api/delete_test_data.py [new file with mode: 0644]

diff --git a/qaapi/qa/modules/api/delete_test_data.py b/qaapi/qa/modules/api/delete_test_data.py
new file mode 100644 (file)
index 0000000..afa5be7
--- /dev/null
@@ -0,0 +1,24 @@
+from qa.Test import Test
+from qa import utils
+
+
+class delete_test_data(Test):
+    """
+    Removes the test data found in config from the plc db
+    """
+
+    def call(self):
+       
+       api = self.config.api
+        auth = self.config.auth
+       
+       site_login_base = self.config.TEST_SITE_LOGIN_BASE
+       
+       # Deleting the site should delete everything associated with it
+       api.DeleteSite(auth, site_login_base)
+       if self.config.verbose:
+           utils.header("Test data deleted")
+
+       return 1 
+       
+