@@ -25,7 +25,9 @@ def test_build_argument_parser_help_message(self):
2525 self .assertIn ("Filenames to check." , help_text )
2626 self .assertIn ("usage:" , help_text )
2727
28- @mock .patch ("pre_commit_hooks.forbid_autopkg_overrides.load_autopkg_recipe" )
28+ @mock .patch (
29+ "pre_commit_macadmin_hooks.forbid_autopkg_overrides.load_autopkg_recipe"
30+ )
2931 def test_main_recipe_missing_required_key (self , mock_load ):
3032 # Simulate a recipe missing the "Process" key
3133 mock_load .return_value = {"Input" : "value" }
@@ -37,7 +39,9 @@ def test_main_recipe_missing_required_key(self, mock_load):
3739 finally :
3840 os .unlink (filename )
3941
40- @mock .patch ("pre_commit_hooks.forbid_autopkg_overrides.load_autopkg_recipe" )
42+ @mock .patch (
43+ "pre_commit_macadmin_hooks.forbid_autopkg_overrides.load_autopkg_recipe"
44+ )
4145 def test_main_recipe_with_required_key (self , mock_load ):
4246 # Simulate a recipe with the "Process" key
4347 mock_load .return_value = {"Process" : [], "Input" : "value" }
@@ -49,7 +53,9 @@ def test_main_recipe_with_required_key(self, mock_load):
4953 finally :
5054 os .unlink (filename )
5155
52- @mock .patch ("pre_commit_hooks.forbid_autopkg_overrides.load_autopkg_recipe" )
56+ @mock .patch (
57+ "pre_commit_macadmin_hooks.forbid_autopkg_overrides.load_autopkg_recipe"
58+ )
5359 def test_main_recipe_load_returns_none (self , mock_load ):
5460 # Simulate load_autopkg_recipe returning None (invalid file)
5561 mock_load .return_value = None
@@ -66,7 +72,9 @@ def test_build_argument_parser(self):
6672 args = parser .parse_args (["file1" , "file2" ])
6773 self .assertEqual (args .filenames , ["file1" , "file2" ])
6874
69- @mock .patch ("pre_commit_hooks.forbid_autopkg_overrides.load_autopkg_recipe" )
75+ @mock .patch (
76+ "pre_commit_macadmin_hooks.forbid_autopkg_overrides.load_autopkg_recipe"
77+ )
7078 def test_main_multiple_files (self , mock_load ):
7179 # First file is valid, second is missing required key
7280 mock_load .side_effect = [{"Process" : []}, {"Input" : "value" }]
@@ -81,7 +89,9 @@ def test_main_multiple_files(self, mock_load):
8189 os .unlink (filenames [0 ])
8290 os .unlink (filenames [1 ])
8391
84- @mock .patch ("pre_commit_hooks.forbid_autopkg_overrides.load_autopkg_recipe" )
92+ @mock .patch (
93+ "pre_commit_macadmin_hooks.forbid_autopkg_overrides.load_autopkg_recipe"
94+ )
8595 def test_main_no_filenames (self , mock_load ):
8696 # No files to check, should return 0
8797 result = target .main ([])
0 commit comments