@@ -153,11 +153,7 @@ def pr_wrong_packit_comment_event():
153153
154154@pytest .fixture
155155def mock_pr_comment_functionality (request ):
156- packit_yaml = (
157- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': "
158- + str (request .param )
159- + "}"
160- )
156+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (request .param ) + "}"
161157
162158 flexmock (
163159 GithubProject ,
@@ -402,7 +398,6 @@ def test_pr_comment_production_build_handler(pr_production_build_comment_event):
402398 packit_yaml = str (
403399 {
404400 "specfile_path" : "the-specfile.spec" ,
405- "synced_files" : [],
406401 "jobs" : [
407402 {
408403 "trigger" : "pull_request" ,
@@ -653,9 +648,7 @@ def test_pr_test_command_handler(
653648 "metadata" : {"targets" : "fedora-rawhide-x86_64" },
654649 },
655650 ]
656- packit_yaml = (
657- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
658- )
651+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
659652 _ = add_pull_request_event_with_pr_id_9
660653 pr = flexmock (head_commit = "12345" )
661654 flexmock (GithubProject ).should_receive ("get_pr" ).and_return (pr )
@@ -741,9 +734,7 @@ def test_pr_test_command_handler_identifiers(
741734 "metadata" : {"targets" : "fedora-rawhide-x86_64" },
742735 },
743736 ]
744- packit_yaml = (
745- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
746- )
737+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
747738 _ = add_pull_request_event_with_pr_id_9
748739 pr = flexmock (head_commit = "12345" )
749740 flexmock (GithubProject ).should_receive ("get_pr" ).and_return (pr )
@@ -906,9 +897,7 @@ def test_pr_test_command_handler_retries(
906897 "metadata" : {"targets" : "fedora-rawhide-x86_64" , "skip_build" : True },
907898 },
908899 ]
909- packit_yaml = (
910- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
911- )
900+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
912901 _ = add_pull_request_event_with_sha_0011223344
913902 pr = flexmock (
914903 source_project = flexmock (
@@ -1109,9 +1098,7 @@ def test_pr_test_command_handler_skip_build_option(
11091098 "metadata" : {"targets" : "fedora-rawhide-x86_64" , "skip_build" : True },
11101099 },
11111100 ]
1112- packit_yaml = (
1113- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
1114- )
1101+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
11151102 pr = flexmock (
11161103 source_project = flexmock (
11171104 get_web_url = lambda : "https://github.com/someone/hello-world" ,
@@ -1303,9 +1290,7 @@ def test_pr_test_command_handler_compose_not_present(
13031290 "metadata" : {"targets" : "fedora-rawhide-x86_64" , "skip_build" : True },
13041291 },
13051292 ]
1306- packit_yaml = (
1307- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
1308- )
1293+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
13091294 _ = add_pull_request_event_with_sha_0011223344
13101295 pr = flexmock (
13111296 source_project = flexmock (
@@ -1432,9 +1417,7 @@ def test_pr_test_command_handler_composes_not_available(
14321417 "metadata" : {"targets" : "fedora-rawhide-x86_64" , "skip_build" : True },
14331418 },
14341419 ]
1435- packit_yaml = (
1436- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
1437- )
1420+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
14381421 _ = add_pull_request_event_with_sha_0011223344
14391422 pr = flexmock (
14401423 source_project = flexmock (
@@ -1557,9 +1540,7 @@ def test_pr_test_command_handler_not_allowed_external_contributor_on_internal_TF
15571540 "metadata" : {"targets" : "fedora-rawhide-x86_64" },
15581541 },
15591542 ]
1560- packit_yaml = (
1561- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
1562- )
1543+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
15631544 db_project_object , _ = add_pull_request_event_with_pr_id_9
15641545 pr = flexmock (head_commit = "12345" )
15651546 flexmock (GithubProject ).should_receive ("get_pr" ).and_return (pr )
@@ -1622,9 +1603,7 @@ def test_pr_build_command_handler_not_allowed_external_contributor_on_internal_T
16221603 "metadata" : {"targets" : "fedora-rawhide-x86_64" },
16231604 },
16241605 ]
1625- packit_yaml = (
1626- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
1627- )
1606+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
16281607 pr = flexmock (head_commit = "12345" )
16291608 flexmock (GithubProject ).should_receive ("get_pr" ).and_return (pr )
16301609 comment = flexmock ()
@@ -1870,9 +1849,7 @@ def test_pr_test_command_handler_skip_build_option_no_fmf_metadata(
18701849 "metadata" : {"targets" : "fedora-rawhide-x86_64" , "skip_build" : True },
18711850 },
18721851 ]
1873- packit_yaml = (
1874- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
1875- )
1852+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
18761853 pr = flexmock (
18771854 source_project = flexmock (
18781855 get_web_url = lambda : "https://github.com/someone/hello-world" ,
@@ -2063,9 +2040,7 @@ def test_pr_test_command_handler_multiple_builds(
20632040 "metadata" : {"targets" : ["fedora-rawhide-x86_64" , "fedora-35-x86_64" ]},
20642041 },
20652042 ]
2066- packit_yaml = (
2067- "{'specfile_path': 'the-specfile.spec', 'synced_files': [], 'jobs': " + str (jobs ) + "}"
2068- )
2043+ packit_yaml = "{'specfile_path': 'the-specfile.spec', 'jobs': " + str (jobs ) + "}"
20692044 pr = flexmock (
20702045 source_project = flexmock (
20712046 get_web_url = lambda : "https://github.com/someone/hello-world" ,
@@ -2352,7 +2327,7 @@ def test_pr_test_command_handler_multiple_builds(
23522327
23532328def test_koji_build_retrigger_via_dist_git_pr_comment (pagure_pr_comment_added ):
23542329 packit_yaml = (
2355- "{'specfile_path': 'python-teamcity-messages.spec', 'synced_files': [], "
2330+ "{'specfile_path': 'python-teamcity-messages.spec',"
23562331 "'jobs': [{'trigger': 'commit', 'job': 'koji_build'}],"
23572332 "'downstream_package_name': 'python-ogr', 'issue_repository': "
23582333 "'https://github.com/namespace/repo'}"
@@ -2492,7 +2467,7 @@ def test_bodhi_update_retrigger_via_dist_git_pr_comment(pagure_pr_comment_added)
24922467 project ["url_path" ] = "rpms/jouduv-dort"
24932468
24942469 packit_yaml = (
2495- "{'specfile_path': 'jouduv-dort.spec', 'synced_files': [], "
2470+ "{'specfile_path': 'jouduv-dort.spec',"
24962471 "'jobs': [{'trigger': 'commit', 'job': 'bodhi_update'}],"
24972472 "'downstream_package_name': 'jouduv-dort'}"
24982473 )
@@ -2985,7 +2960,7 @@ def _get_project(url, *_, **__):
29852960)
29862961def test_koji_build_tag_via_dist_git_pr_comment (pagure_pr_comment_added , all_branches ):
29872962 packit_yaml = (
2988- "{'specfile_path': 'python-teamcity-messages.spec', 'synced_files': [], "
2963+ "{'specfile_path': 'python-teamcity-messages.spec',"
29892964 "'jobs': [{'trigger': 'commit', 'job': 'koji_build', 'sidetag_group': 'test',"
29902965 "'dist_git_branches': ['fedora-stable']}],"
29912966 "'downstream_package_name': 'python-ogr', 'issue_repository': "
0 commit comments