Mercurial > farol
comparison 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 |
comparison
equal
deleted
inserted
replaced
79:2c7786d7d14e | 80:c00f20bd90ba |
---|---|
52 rv = self.app.post('/producttree/branch/add', data=dict(type="Product Name", name="Saner", parent="0")) | 52 rv = self.app.post('/producttree/branch/add', data=dict(type="Product Name", name="Saner", parent="0")) |
53 rv = self.app.get('/producttree/branch/0/0/edit') | 53 rv = self.app.get('/producttree/branch/0/0/edit') |
54 rv = self.app.post('/producttree/branch/0/0/edit', data=dict(type="Vendor", name="Other", parent=""), follow_redirects=True) | 54 rv = self.app.post('/producttree/branch/0/0/edit', data=dict(type="Vendor", name="Other", parent=""), follow_redirects=True) |
55 self._assertIn('<a href="/producttree/branch/1/edit">edit</a>', rv) | 55 self._assertIn('<a href="/producttree/branch/1/edit">edit</a>', rv) |
56 | 56 |
57 def testDeleteBranch(self): | |
58 rv = self.createDoc('Title', 'Type') | |
59 self.assertEqual(rv.status_code, 200) | |
60 rv = self.app.post('/producttree/create') | |
61 rv = self.app.get('/producttree/branch/add') | |
62 rv = self.app.post('/producttree/branch/add', data=dict(type="Vendor", name="SecPod", parent="")) | |
63 rv = self.app.post('/producttree/branch/0/del', follow_redirects=True) | |
64 self.assertEqual(rv.status_code, 200) | |
65 |