diff --git a/mistral/cmd/launch.py b/mistral/cmd/launch.py index b6b159722..ec79816ae 100644 --- a/mistral/cmd/launch.py +++ b/mistral/cmd/launch.py @@ -143,7 +143,7 @@ MISTRAL_TITLE = """ || || || __// ||_// || \\\__// \\\_ || Mistral Workflow Service, version %s -""" % version.version_string() +""" % version.version_string def print_server_info(): diff --git a/mistral/tests/unit/test_version.py b/mistral/tests/unit/test_version.py new file mode 100644 index 000000000..676fa8d67 --- /dev/null +++ b/mistral/tests/unit/test_version.py @@ -0,0 +1,19 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from mistral.tests.unit import base +from mistral.version import version_string + + +class VersionStringTest(base.BaseTest): + def test_version(self): + self.assertIsInstance(version_string, str) diff --git a/mistral/version.py b/mistral/version.py index 892b7b9ee..40ba471c7 100644 --- a/mistral/version.py +++ b/mistral/version.py @@ -15,4 +15,4 @@ from pbr import version version_info = version.VersionInfo('mistral') -version_string = version_info.version_string +version_string = version_info.version_string()