From 7ae5bef233d744f514427a33e1da531040d3fd6f Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Wed, 6 Dec 2017 15:35:28 +0300 Subject: Tests: check_modules() function introduced. --- test/test_basic.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/test_basic.py') 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') -- cgit