2323)
2424
2525
26- def test_add_handler_and_config_to_archive_success ():
27- """Test successful add_handler_and_config_to_archive ."""
26+ def test_get_archive_success ():
27+ """Test successful get_archive ."""
2828 from ops .package_lambda_policy import (
29- add_handler_and_config_to_archive ,
29+ get_archive ,
3030 create_custodian_archive ,
3131 )
3232
@@ -35,7 +35,7 @@ def test_add_handler_and_config_to_archive_success():
3535 policy_list = [SIMPLE_PERIODIC_POLICY_DICT ]
3636 exec_options = EXEC_OPTIONS
3737
38- result = add_handler_and_config_to_archive (archive , policy_list , exec_options )
38+ result = get_archive (archive , policy_list , exec_options )
3939 assert result == archive
4040
4141 archive .close ()
@@ -55,9 +55,9 @@ def test_add_handler_and_config_to_archive_success():
5555 archive .remove ()
5656
5757
58- def test_add_handler_and_config_to_archive_handler_assertion_error ():
59- """Test add_handler_and_config_to_archive with AssertionError on handler template."""
60- from ops .package_lambda_policy import add_handler_and_config_to_archive
58+ def test_get_archive_handler_assertion_error ():
59+ """Test get_archive with AssertionError on handler template."""
60+ from ops .package_lambda_policy import get_archive
6161 from unittest .mock import MagicMock
6262
6363 # Create mock archive that raises AssertionError on first add_contents call
@@ -68,12 +68,12 @@ def test_add_handler_and_config_to_archive_handler_assertion_error():
6868 exec_options = EXEC_OPTIONS
6969
7070 with pytest .raises (RuntimeError ):
71- add_handler_and_config_to_archive (mock_archive , policy_list , exec_options )
71+ get_archive (mock_archive , policy_list , exec_options )
7272
7373
74- def test_add_handler_and_config_to_archive_config_assertion_error ():
75- """Test add_handler_and_config_to_archive with AssertionError on config.json."""
76- from ops .package_lambda_policy import add_handler_and_config_to_archive
74+ def test_get_archive_config_assertion_error ():
75+ """Test get_archive with AssertionError on config.json."""
76+ from ops .package_lambda_policy import get_archive
7777 from unittest .mock import MagicMock
7878
7979 # Create mock archive that succeeds first call but fails second
@@ -84,7 +84,7 @@ def test_add_handler_and_config_to_archive_config_assertion_error():
8484 exec_options = EXEC_OPTIONS
8585
8686 with pytest .raises (RuntimeError ):
87- add_handler_and_config_to_archive (mock_archive , policy_list , exec_options )
87+ get_archive (mock_archive , policy_list , exec_options )
8888
8989
9090def test_get_custodian_tags_schedule_mode ():
0 commit comments