From fdbc0f410e716a6d1aec1aaf4b377380e18f6d68 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Dec 11 2017 04:06:26 +0000 Subject: Fix test test_lint_each_file_once TestLint requires dist is .fc26. This makes test run in different Fedora releases correctly, not only in Fedora 26. Signed-off-by: Chenxiong Qi --- diff --git a/tests/test_commands.py b/tests/test_commands.py index 6175d06..86791f5 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -914,7 +914,10 @@ class TestLint(CommandTestCase): @patch('os.path.exists') @patch('pyrpkg.Commands._run_command') @patch('pyrpkg.Commands.load_rpmdefines', new=mock_load_rpmdefines) - def test_lint_each_file_once(self, run, exists, glob): + @patch('pyrpkg.Commands.rel', new_callable=PropertyMock) + def test_lint_each_file_once(self, rel, run, exists, glob): + rel.return_value = '2.fc26' + cmd = self.make_commands() srpm_path = os.path.join(cmd.path, 'docpkg-1.2-2.fc26.src.rpm') bin_path = os.path.join(cmd.path, 'x86_64', 'docpkg-1.2-2.fc26.x86_64.rpm')