diff options
| author | Andrei Belov <defan@nginx.com> | 2020-04-16 18:27:26 +0300 |
|---|---|---|
| committer | Andrei Belov <defan@nginx.com> | 2020-04-16 18:27:26 +0300 |
| commit | 74f32d26b91f49d3392605e81c1597b375890b60 (patch) | |
| tree | adfc67dfc86461441bde65512f745ce27bd6ea28 /test/test_php_basic.py | |
| parent | 2ff9df10ef1df43c935c870175e52473dad2c21a (diff) | |
| parent | 9877087756144d3bdf343d0d4e91e1efbcc62c93 (diff) | |
| download | unit-74f32d26b91f49d3392605e81c1597b375890b60.tar.gz unit-74f32d26b91f49d3392605e81c1597b375890b60.tar.bz2 | |
Merged with the default branch.1.17.0-1
Diffstat (limited to 'test/test_php_basic.py')
| -rw-r--r-- | test/test_php_basic.py | 56 |
1 files changed, 8 insertions, 48 deletions
diff --git a/test/test_php_basic.py b/test/test_php_basic.py index 7ecff1b2..5fde3e00 100644 --- a/test/test_php_basic.py +++ b/test/test_php_basic.py @@ -37,9 +37,6 @@ class TestPHPBasic(TestControl): 'applications', ) - def test_php_get_applications_prefix(self): - self.conf(self.conf_app, 'applications') - self.assertEqual( self.conf_get('applications'), { @@ -53,9 +50,6 @@ class TestPHPBasic(TestControl): 'applications prefix', ) - def test_php_get_applications_prefix_2(self): - self.conf(self.conf_app, 'applications') - self.assertEqual( self.conf_get('applications/app'), { @@ -67,9 +61,6 @@ class TestPHPBasic(TestControl): 'applications prefix 2', ) - def test_php_get_applications_prefix_3(self): - self.conf(self.conf_app, 'applications') - self.assertEqual(self.conf_get('applications/app/type'), 'php', 'type') self.assertEqual( self.conf_get('applications/app/processes/spare'), @@ -86,18 +77,12 @@ class TestPHPBasic(TestControl): 'listeners', ) - def test_php_get_listeners_prefix(self): - self.conf(self.conf_basic) - self.assertEqual( self.conf_get('listeners'), {"*:7080": {"pass": "applications/app"}}, 'listeners prefix', ) - def test_php_get_listeners_prefix_2(self): - self.conf(self.conf_basic) - self.assertEqual( self.conf_get('listeners/*:7080'), {"pass": "applications/app"}, @@ -147,49 +132,24 @@ class TestPHPBasic(TestControl): def test_php_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_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_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'), 'applications restore', ) + if __name__ == '__main__': TestPHPBasic.main() |
