summaryrefslogtreecommitdiffhomepage
path: root/test/test_configuration.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2017-12-06 15:35:28 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2017-12-06 15:35:28 +0300
commit7ae5bef233d744f514427a33e1da531040d3fd6f (patch)
tree1bf4ddf1dcfc1d888fdc0c7a21b2f0fe3d3fb37b /test/test_configuration.py
parent79b1d4f5ff664cba84108fd124d78362949faa99 (diff)
downloadunit-7ae5bef233d744f514427a33e1da531040d3fd6f.tar.gz
unit-7ae5bef233d744f514427a33e1da531040d3fd6f.tar.bz2
Tests: check_modules() function introduced.
Diffstat (limited to 'test/test_configuration.py')
-rw-r--r--test/test_configuration.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_configuration.py b/test/test_configuration.py
index 7d487e49..8d913077 100644
--- a/test/test_configuration.py
+++ b/test/test_configuration.py
@@ -3,6 +3,13 @@ import unittest
class TestUnitConfiguration(unit.TestUnitControl):
+ @classmethod
+ def setUpClass(cls):
+ u = unit.TestUnit()
+ module_missed = u.check_modules('python')
+ if module_missed:
+ raise unittest.SkipTest('Unit has no ' + module_missed + ' module')
+
def test_json_applications(self):
self.assertIn('error', self.put('/applications', '"{}"'),
'applications string')