diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2017-12-06 15:35:28 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2017-12-06 15:35:28 +0300 |
commit | 7ae5bef233d744f514427a33e1da531040d3fd6f (patch) | |
tree | 1bf4ddf1dcfc1d888fdc0c7a21b2f0fe3d3fb37b /test/test_basic.py | |
parent | 79b1d4f5ff664cba84108fd124d78362949faa99 (diff) | |
download | unit-7ae5bef233d744f514427a33e1da531040d3fd6f.tar.gz unit-7ae5bef233d744f514427a33e1da531040d3fd6f.tar.bz2 |
Tests: check_modules() function introduced.
Diffstat (limited to '')
-rw-r--r-- | test/test_basic.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_basic.py b/test/test_basic.py index e6a5c6e8..ec893325 100644 --- a/test/test_basic.py +++ b/test/test_basic.py @@ -3,6 +3,13 @@ import unittest class TestUnitBasic(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_get(self):
resp = self.get()
self.assertEqual(resp, {'listeners': {}, 'applications': {}}, 'empty')
|