diff tests/testBranches.py @ 80:c00f20bd90ba

Allow deletion of (orphaned) Branches
author Benoît Allard <benoit.allard@greenbone.net>
date Thu, 09 Oct 2014 12:16:55 +0200
parents 2c7786d7d14e
children
line wrap: on
line diff
--- a/tests/testBranches.py	Thu Oct 09 12:16:16 2014 +0200
+++ b/tests/testBranches.py	Thu Oct 09 12:16:55 2014 +0200
@@ -54,3 +54,12 @@
         rv = self.app.post('/producttree/branch/0/0/edit', data=dict(type="Vendor", name="Other", parent=""), follow_redirects=True)
         self._assertIn('<a href="/producttree/branch/1/edit">edit</a>', rv)
 
+    def testDeleteBranch(self):
+        rv = self.createDoc('Title', 'Type')
+        self.assertEqual(rv.status_code, 200)
+        rv = self.app.post('/producttree/create')
+        rv = self.app.get('/producttree/branch/add')
+        rv = self.app.post('/producttree/branch/add', data=dict(type="Vendor", name="SecPod", parent=""))
+        rv = self.app.post('/producttree/branch/0/del', follow_redirects=True)
+        self.assertEqual(rv.status_code, 200)
+

http://farol.wald.intevation.org