From 98a1a5569421b571aa6e775aa0d878c4d8da910b Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 7 Jul 2017 14:35:08 -0400 Subject: [PATCH] Remove checksum comparison in CG test. The checksum of the build.log file changes every time because it is (in part) based on the timestamp that the file was written (at the time of the test run). --- tests/test_content_generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_content_generator.py b/tests/test_content_generator.py index 79b89606..59671401 100644 --- a/tests/test_content_generator.py +++ b/tests/test_content_generator.py @@ -113,6 +113,9 @@ class TestBuild(unittest.TestCase): file_dir = self.cg._prepare_file_directory() ret = self.cg._get_content_generator_metadata(file_dir) rpms_in_tag.assert_called_once() + # Remove checksums for the logs, because they change with time. + del ret['output'][-1]['checksum'] + del expected_output['output'][-1]['checksum'] self.assertEqual(expected_output, ret) @patch("subprocess.Popen")