summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_basic.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_python_basic.py')
-rw-r--r--test/test_python_basic.py69
1 files changed, 10 insertions, 59 deletions
diff --git a/test/test_python_basic.py b/test/test_python_basic.py
index 67a5f548..3233fca2 100644
--- a/test/test_python_basic.py
+++ b/test/test_python_basic.py
@@ -19,17 +19,9 @@ class TestPythonBasic(TestControl):
}
def test_python_get_empty(self):
- self.assertEqual(
- self.conf_get(), {'listeners': {}, 'applications': {}}, 'empty'
- )
-
- def test_python_get_prefix_listeners(self):
- self.assertEqual(self.conf_get('listeners'), {}, 'listeners prefix')
-
- def test_python_get_prefix_applications(self):
- self.assertEqual(
- self.conf_get('applications'), {}, 'applications prefix'
- )
+ self.assertEqual(self.conf_get(), {'listeners': {}, 'applications': {}})
+ self.assertEqual(self.conf_get('listeners'), {})
+ self.assertEqual(self.conf_get('applications'), {})
def test_python_get_applications(self):
self.conf(self.conf_app, 'applications')
@@ -50,9 +42,6 @@ class TestPythonBasic(TestControl):
'applications',
)
- def test_python_get_applications_prefix(self):
- self.conf(self.conf_app, 'applications')
-
self.assertEqual(
self.conf_get('applications'),
{
@@ -66,9 +55,6 @@ class TestPythonBasic(TestControl):
'applications prefix',
)
- def test_python_get_applications_prefix_2(self):
- self.conf(self.conf_app, 'applications')
-
self.assertEqual(
self.conf_get('applications/app'),
{
@@ -80,9 +66,6 @@ class TestPythonBasic(TestControl):
'applications prefix 2',
)
- def test_python_get_applications_prefix_3(self):
- self.conf(self.conf_app, 'applications')
-
self.assertEqual(
self.conf_get('applications/app/type'), 'python', 'type'
)
@@ -99,18 +82,12 @@ class TestPythonBasic(TestControl):
'listeners',
)
- def test_python_get_listeners_prefix(self):
- self.conf(self.conf_basic)
-
self.assertEqual(
self.conf_get('listeners'),
{"*:7080": {"pass": "applications/app"}},
'listeners prefix',
)
- def test_python_get_listeners_prefix_2(self):
- self.conf(self.conf_basic)
-
self.assertEqual(
self.conf_get('listeners/*:7080'),
{"pass": "applications/app"},
@@ -160,44 +137,18 @@ class TestPythonBasic(TestControl):
def test_python_delete(self):
self.conf(self.conf_basic)
- self.assertIn(
- 'error',
- self.conf_delete('applications/app'),
- 'delete app before listener',
- )
- self.assertIn(
- 'success', self.conf_delete('listeners/*:7080'), 'delete listener'
- )
- self.assertIn(
- 'success',
- self.conf_delete('applications/app'),
- 'delete app after listener',
- )
- self.assertIn(
- 'error', self.conf_delete('applications/app'), 'delete app again'
- )
+ self.assertIn('error', self.conf_delete('applications/app'))
+ self.assertIn('success', self.conf_delete('listeners/*:7080'))
+ self.assertIn('success', self.conf_delete('applications/app'))
+ self.assertIn('error', self.conf_delete('applications/app'))
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_delete('listeners'))
+ self.assertIn('success', self.conf_delete('applications'))
+ self.assertIn('success', self.conf(self.conf_app, 'applications'))
self.assertIn(
'success',
self.conf({"*:7081": {"pass": "applications/app"}}, 'listeners'),