summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_php_basic.py26
-rw-r--r--test/test_python_basic.py27
2 files changed, 53 insertions, 0 deletions
diff --git a/test/test_php_basic.py b/test/test_php_basic.py
index 02ff81de..be5064ba 100644
--- a/test/test_php_basic.py
+++ b/test/test_php_basic.py
@@ -164,6 +164,32 @@ class TestPHPBasic(TestControl):
'error', self.conf_delete('applications/app'), 'delete app again'
)
+ def test_php_delete_blocks(self):
+ self.conf(self.conf_basic)
+
+ self.assertIn(
+ 'success',
+ self.conf_delete('listeners'),
+ 'listeners delete',
+ )
+
+ self.assertIn(
+ 'success',
+ self.conf_delete('applications'),
+ 'applications delete',
+ )
+
+ self.assertIn(
+ 'success',
+ self.conf(self.conf_app, 'applications'),
+ 'listeners restore',
+ )
+
+ self.assertIn(
+ 'success',
+ self.conf({"*:7080": {"pass": "applications/app"}}, 'listeners'),
+ 'applications restore',
+ )
if __name__ == '__main__':
TestPHPBasic.main()
diff --git a/test/test_python_basic.py b/test/test_python_basic.py
index 9987e886..f7a7e354 100644
--- a/test/test_python_basic.py
+++ b/test/test_python_basic.py
@@ -177,6 +177,33 @@ class TestPythonBasic(TestControl):
'error', self.conf_delete('applications/app'), 'delete app again'
)
+ def test_python_delete_blocks(self):
+ self.conf(self.conf_basic)
+
+ self.assertIn(
+ 'success',
+ self.conf_delete('listeners'),
+ 'listeners delete',
+ )
+
+ self.assertIn(
+ 'success',
+ self.conf_delete('applications'),
+ 'applications delete',
+ )
+
+ self.assertIn(
+ 'success',
+ self.conf(self.conf_app, 'applications'),
+ 'listeners restore',
+ )
+
+ self.assertIn(
+ 'success',
+ self.conf({"*:7080": {"pass": "applications/app"}}, 'listeners'),
+ 'applications restore',
+ )
+
if __name__ == '__main__':
TestPythonBasic.main()