diff --git a/tests/commands/test_cli.py b/tests/commands/test_cli.py index 7518359..4c2f7d4 100644 --- a/tests/commands/test_cli.py +++ b/tests/commands/test_cli.py @@ -2,6 +2,7 @@ import unittest from click.testing import CliRunner +from tutor.__about__ import __version__ from tutor.commands.cli import cli, print_help @@ -23,4 +24,4 @@ class CliTests(unittest.TestCase): result = runner.invoke(cli, ["--version"]) self.assertEqual(0, result.exit_code) self.assertIsNone(result.exception) - self.assertRegex(result.output, r"cli, version \d+.\d+.\d+\n") + self.assertRegex(result.output, r"cli, version {}\n".format(__version__)) diff --git a/tests/commands/test_images.py b/tests/commands/test_images.py index 1a3c058..7dc9fdc 100644 --- a/tests/commands/test_images.py +++ b/tests/commands/test_images.py @@ -4,6 +4,7 @@ from unittest.mock import Mock, patch from click.testing import CliRunner from tests.helpers import TestContext, temporary_root +from tutor.__about__ import __version__ from tutor import images, plugins from tutor.commands.config import config_command from tutor.commands.images import ImageNotFoundError, images_command @@ -65,7 +66,7 @@ class ImagesTests(unittest.TestCase): self.assertEqual(0, result.exit_code) self.assertIsNone(result.exception) self.assertRegex( - result.output, r"docker.io/overhangio/openedx:\d+.\d+.\d+\n" + result.output, r"docker.io/overhangio/openedx:{}\n".format(__version__) ) @patch.object(plugins.BasePlugin, "iter_installed", return_value=[])