summaryrefslogtreecommitdiffhomepage
path: root/test/test_configuration.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-09-06 20:18:33 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-09-06 20:18:33 +0300
commit511a0fa7605e61f90e524edfbcbefa230573e32f (patch)
tree011538ece353c804605a05452daa344e8be2d2fd /test/test_configuration.py
parent58d23eb5b4cc15a11fa4550dc165b6be4797525a (diff)
downloadunit-511a0fa7605e61f90e524edfbcbefa230573e32f.tar.gz
unit-511a0fa7605e61f90e524edfbcbefa230573e32f.tar.bz2
Tests: used relative path for configuration.
Diffstat (limited to 'test/test_configuration.py')
-rw-r--r--test/test_configuration.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/test_configuration.py b/test/test_configuration.py
index 7e966b14..6db65bb3 100644
--- a/test/test_configuration.py
+++ b/test/test_configuration.py
@@ -22,9 +22,9 @@ class TestUnitConfiguration(unit.TestUnitControl):
"module": "wsgi"
}
}
- """, '/applications'), 'unicode')
+ """, 'applications'), 'unicode')
- self.assertDictEqual(self.conf_get('/applications'), {
+ self.assertDictEqual(self.conf_get('applications'), {
"app": {
"type": "python",
"processes": { "spare": 0 },
@@ -41,9 +41,9 @@ class TestUnitConfiguration(unit.TestUnitControl):
"path": "/app",
"module": "wsgi"
}
- }, '/applications'), 'unicode 2')
+ }, 'applications'), 'unicode 2')
- self.assertIn('приложение', self.conf_get('/applications'),
+ self.assertIn('приложение', self.conf_get('applications'),
'unicode 2 get')
def test_json_unicode_number(self):
@@ -56,13 +56,13 @@ class TestUnitConfiguration(unit.TestUnitControl):
"module": "wsgi"
}
}
- """, '/applications'), 'unicode number')
+ """, 'applications'), 'unicode number')
def test_applications_open_brace(self):
- self.assertIn('error', self.conf('{', '/applications'), 'open brace')
+ self.assertIn('error', self.conf('{', 'applications'), 'open brace')
def test_applications_string(self):
- self.assertIn('error', self.conf('"{}"', '/applications'), 'string')
+ self.assertIn('error', self.conf('"{}"', 'applications'), 'string')
def test_applications_type_only(self):
self.skip_alerts.extend([
@@ -75,7 +75,7 @@ class TestUnitConfiguration(unit.TestUnitControl):
"app": {
"type": "python"
}
- }, '/applications'), 'type only')
+ }, 'applications'), 'type only')
def test_applications_miss_quote(self):
self.assertIn('error', self.conf("""
@@ -87,7 +87,7 @@ class TestUnitConfiguration(unit.TestUnitControl):
"module": "wsgi"
}
}
- """, '/applications'), 'miss quote')
+ """, 'applications'), 'miss quote')
def test_applications_miss_colon(self):
self.assertIn('error', self.conf("""
@@ -99,7 +99,7 @@ class TestUnitConfiguration(unit.TestUnitControl):
"module": "wsgi"
}
}
- """, '/applications'), 'miss colon')
+ """, 'applications'), 'miss colon')
def test_applications_miss_comma(self):
self.assertIn('error', self.conf("""
@@ -111,10 +111,10 @@ class TestUnitConfiguration(unit.TestUnitControl):
"module": "wsgi"
}
}
- """, '/applications'), 'miss comma')
+ """, 'applications'), 'miss comma')
def test_applications_skip_spaces(self):
- self.assertIn('success', self.conf(b'{ \n\r\t}', '/applications'),
+ self.assertIn('success', self.conf(b'{ \n\r\t}', 'applications'),
'skip spaces')
def test_applications_relative_path(self):
@@ -125,7 +125,7 @@ class TestUnitConfiguration(unit.TestUnitControl):
"path": "../app",
"module": "wsgi"
}
- }, '/applications'), 'relative path')
+ }, 'applications'), 'relative path')
@unittest.expectedFailure
def test_listeners_empty(self):
@@ -136,12 +136,12 @@ class TestUnitConfiguration(unit.TestUnitControl):
r'process \d+ exited on signal'
])
- self.assertIn('error', self.conf({"*:7080":{}}, '/listeners'),
+ self.assertIn('error', self.conf({"*:7080":{}}, 'listeners'),
'listener empty')
def test_listeners_no_app(self):
self.assertIn('error', self.conf({"*:7080":{"application":"app"}},
- '/listeners'), 'listeners no app')
+ 'listeners'), 'listeners no app')
def test_listeners_wildcard(self):
self.assertIn('success', self.conf({