Module: check_mk
Branch: master
Commit: 8fcb334a2bfdc5614510f5f9ccb20989edf3e161
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8fcb334a2bfdc5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 28 17:08:34 2016 +0200
Fixed python version test after recent update
---
tests/omd/test_python.py | 2 +-
tests/testlib/__init__.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/omd/test_python.py b/tests/omd/test_python.py
index 31fea8b..bcd06bb 100644
--- a/tests/omd/test_python.py
+++ b/tests/omd/test_python.py
@@ -22,7 +22,7 @@ def test_03_python_interpreter_version(site):
p = site.execute(["python", "-V"],
stderr=subprocess.PIPE)
version = p.stderr.read()
- assert version.startswith("Python 2.7.11")
+ assert version.startswith("Python 2.7.12")
def test_03_python_path(site):
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 8e50b56..3d9c599 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -47,6 +47,9 @@ class CMKVersion(object):
def __init__(self, version, edition):
self.set_version(version)
+
+ if len(edition) != 3:
+ raise Exception("Invalid edition: %s. Must be short notation (cee, cre,
...)")
self.edition_short = edition
self._credentials = ("d-vonheute", "lOBFsgAH")
@@ -68,6 +71,8 @@ class CMKVersion(object):
self.version = self.get_default_version()
else:
+ if ".cee" in version or ".cre" in version:
+ raise Exception("Invalid version. Remove the edition suffix!")
self.version = version