Module: check_mk
Branch: master
Commit: 886240b846f5c7637ee304592a16945bb0b8ec1d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=886240b846f5c7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 17 08:14:28 2018 +0100
Add test to ensure some specific python modules are loaded from the site
Change-Id: Ibaa76888b686be7af6a0a0d9dd884bc09986b853
---
tests/omd/test_python.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/omd/test_python.py b/tests/omd/test_python.py
index 88ccf9d..8f7cab3 100644
--- a/tests/omd/test_python.py
+++ b/tests/omd/test_python.py
@@ -53,3 +53,17 @@ def test_03_pip_interpreter_version(site):
stdout=subprocess.PIPE)
version = p.stdout.read()
assert version.startswith("pip 9.")
+
+
+def test_python_modules(site):
+ test_modules = [
+ "netsnmp",
+ "pysphere",
+ "ldap",
+ "cryptography",
+ ]
+
+ import importlib
+ for test_module_name in test_modules:
+ module = importlib.import_module(test_module_name)
+ assert module.__file__.startswith("/omd/sites/heute/lib/python")