diff --git a/pagure/lib/tasks_services.py b/pagure/lib/tasks_services.py index eb78d0a..23f0f46 100644 --- a/pagure/lib/tasks_services.py +++ b/pagure/lib/tasks_services.py @@ -308,7 +308,14 @@ def load_json_commits_to_db( file_list = set(get_files_to_load(project.fullname, commits, abspath)) n = len(file_list) _log.info("LOADJSON: %s files to process" % n) - mail_body = [] + mail_body = [ + "Good Morning", + "", + "This is the log of loading all the files pushed in the git repo into", + "the database. It should ignore files that are not JSON files, this", + "is fine.", + "", + ] for idx, filename in enumerate(sorted(file_list)): _log.info( diff --git a/tests/test_pagure_lib_task_services.py b/tests/test_pagure_lib_task_services.py index 866bbeb..300b544 100644 --- a/tests/test_pagure_lib_task_services.py +++ b/tests/test_pagure_lib_task_services.py @@ -332,6 +332,11 @@ class PagureLibTaskServicestests(tests.Modeltests): ) calls = [ call( + u'Good Morning\n\n' + u'This is the log of loading all the files pushed in the git ' + u'repo into\n' + u'the database. It should ignore files that are not JSON files,' + u' this\nis fine.\n\n' u'Loading: file1 -- 1/2 ... ... Done\n' u'Loading: file2 -- 2/2 ... ... Done', u'Issue import report', @@ -380,6 +385,11 @@ class PagureLibTaskServicestests(tests.Modeltests): calls = [ call( + u'Good Morning\n\n' + u'This is the log of loading all the files pushed in the git ' + u'repo into\n' + u'the database. It should ignore files that are not JSON files,' + u' this\nis fine.\n\n' u'Loading: file1 -- 1/2 ... ... FAILED\n', u'Issue import report', u'bar@pingou.com' @@ -805,6 +815,11 @@ class PagureLibTaskServicesLoadJsonTickettests(tests.Modeltests): up_pr.assert_not_called() calls = [ call( + u'Good Morning\n\n' + u'This is the log of loading all the files pushed in the git ' + u'repo into\n' + u'the database. It should ignore files that are not JSON files,' + u' this\nis fine.\n\n' u'Loading: %s -- 1/1 ... ... Done' % issue.uid, u'Issue import report', u'bar@pingou.com'