diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-26 20:18:24 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-26 20:18:24 +0300 |
commit | 6aa00fa8d08e3b937f707ce114c7095300118584 (patch) | |
tree | a6ef0004ec2ac8c575850be93f5de0302398af6e /test/test_configuration.py | |
parent | a89747e97c2a00503260d72082949be4ba97983f (diff) | |
download | unit-6aa00fa8d08e3b937f707ce114c7095300118584.tar.gz unit-6aa00fa8d08e3b937f707ce114c7095300118584.tar.bz2 |
Tests: more configuration tests.
Diffstat (limited to 'test/test_configuration.py')
-rw-r--r-- | test/test_configuration.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/test/test_configuration.py b/test/test_configuration.py index 700e4aa1..82638507 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -21,6 +21,15 @@ class TestUnitConfiguration(unit.TestUnitControl): } """, '/applications'), 'unicode') + self.assertDictEqual(self.conf_get('/applications'), { + "app": { + "type": "python", + "processes": { "spare": 0 }, + "path": "/app", + "module": "wsgi" + } + }, 'unicode get') + def test_json_unicode_2(self): self.assertIn('success', self.conf({ "приложение": { @@ -31,6 +40,9 @@ class TestUnitConfiguration(unit.TestUnitControl): } }, '/applications'), 'unicode 2') + self.assertIn('приложение', self.conf_get('/applications'), + 'unicode 2 get') + def test_json_unicode_number(self): self.assertIn('error', self.conf(b""" { @@ -49,16 +61,6 @@ class TestUnitConfiguration(unit.TestUnitControl): def test_applications_string(self): self.assertIn('error', self.conf('"{}"', '/applications'), 'string') - def test_negative_spare(self): - self.assertIn('error', self.conf({ - "app": { - "type": "python", - "processes": { "spare": -1 }, - "path": "/app", - "module": "wsgi" - } - }, '/applications'), 'negative spare') - def test_applications_type_only(self): self.assertIn('error', self.conf({ "app": { |