← Về thư mục
tests/labarchive-integration/test_scripts.py
- SignatureTests · class · L46-L118 — class SignatureTests(unittest.TestCase)
- test_the_official_vendor_vector_reproduces_exactly · method · L47-L55 — def test_the_official_vendor_vector_reproduces_exactly(self) -> None
- test_the_signature_is_base64_hmac_sha512_over_the_concatenation · method · L57-L68 — def test_the_signature_is_base64_hmac_sha512_over_the_concatenation(self) -> None: # Recomputed independently: any change to the message layout shows up # here rather than as a 401 from the API.
- test_every_input_changes_the_signature · method · L70-L80 — def test_every_input_changes_the_signature(self) -> None
- test_empty_inputs_are_refused_before_signing · method · L82-L92 — def test_empty_inputs_are_refused_before_signing(self) -> None
- test_a_negative_expiry_is_refused · method · L94-L96 — def test_a_negative_expiry_is_refused(self) -> None
- test_the_signature_is_uri_encoded_for_a_query_parameter · method · L98-L101 — def test_the_signature_is_uri_encoded_for_a_query_parameter(self) -> None: # Base64 contains '+' and '/', which are meaningful in a query string.
- test_the_self_test_command_reports_a_pass_without_a_network_call · method · L103-L118 — def test_the_self_test_command_reports_a_pass_without_a_network_call(self) -> None
- Args · class · L104-L105 — class Args
- AuthParameterTests · class · L121-L156 — class AuthParameterTests(unittest.TestCase)
- test_eln_parameters_carry_the_key_expiry_and_signature · method · L122-L132 — def test_eln_parameters_carry_the_key_expiry_and_signature(self) -> None
- test_the_password_never_appears_in_the_parameters · method · L134-L138 — def test_the_password_never_appears_in_the_parameters(self) -> None
- test_inventory_headers_sign_the_resolved_path · method · L140-L151 — def test_inventory_headers_sign_the_resolved_path(self) -> None
- test_an_omitted_expiry_defaults_to_now · method · L153-L156 — def test_an_omitted_expiry_defaults_to_now(self) -> None
- ComponentValidationTests · class · L159-L171 — class ComponentValidationTests(unittest.TestCase)
- test_valid_method_names_are_accepted · method · L160-L165 — def test_valid_method_names_are_accepted(self) -> None
- test_anything_outside_the_documented_shape_is_refused · method · L167-L171 — def test_anything_outside_the_documented_shape_is_refused(self) -> None
- InventoryPathTests · class · L174-L211 — class InventoryPathTests(unittest.TestCase)
- test_a_resolved_route_is_accepted · method · L175-L178 — def test_a_resolved_route_is_accepted(self) -> None
- test_a_query_or_fragment_is_refused · method · L180-L185 — def test_a_query_or_fragment_is_refused(self) -> None: # Signing a path but sending it with a query signs the wrong thing.
- test_a_percent_encoded_path_is_refused · method · L187-L189 — def test_a_percent_encoded_path_is_refused(self) -> None
- test_unresolved_placeholders_are_refused · method · L191-L193 — def test_unresolved_placeholders_are_refused(self) -> None
- test_a_path_outside_the_public_v1_prefix_is_refused · method · L195-L199 — def test_a_path_outside_the_public_v1_prefix_is_refused(self) -> None
- test_traversal_and_ambiguous_segments_are_refused · method · L201-L205 — def test_traversal_and_ambiguous_segments_are_refused(self) -> None
- test_whitespace_and_backslashes_are_refused · method · L207-L211 — def test_whitespace_and_backslashes_are_refused(self) -> None
- ApiUrlTests · class · L214-L266 — class ApiUrlTests(unittest.TestCase)
- test_every_documented_region_url_normalises_to_itself · method · L215-L220 — def test_every_documented_region_url_normalises_to_itself(self) -> None
- test_a_trailing_slash_and_mixed_case_host_are_normalised · method · L222-L227 — def test_a_trailing_slash_and_mixed_case_host_are_normalised(self) -> None
- test_plain_http_is_refused · method · L229-L232 — def test_plain_http_is_refused(self) -> None
- test_embedded_credentials_are_refused · method · L234-L238 — def test_embedded_credentials_are_refused(self) -> None
- test_a_custom_port_query_or_fragment_is_refused · method · L240-L251 — def test_a_custom_port_query_or_fragment_is_refused(self) -> None
- test_a_non_allowlisted_host_is_refused_and_lists_the_alternatives · method · L253-L256 — def test_a_non_allowlisted_host_is_refused_and_lists_the_alternatives(self) -> None
- test_the_path_must_be_exactly_api · method · L258-L262 — def test_the_path_must_be_exactly_api(self) -> None
- test_an_empty_url_is_refused · method · L264-L266 — def test_an_empty_url_is_refused(self) -> None
- ContainerMemberTests · class · L269-L302 — class ContainerMemberTests(unittest.TestCase)
- test_ordinary_member_paths_are_accepted · method · L272-L275 — def test_ordinary_member_paths_are_accepted(self) -> None
- test_traversal_and_absolute_paths_are_rejected · method · L277-L280 — def test_traversal_and_absolute_paths_are_rejected(self) -> None
- test_backslashes_nulls_and_empty_names_are_rejected · method · L282-L285 — def test_backslashes_nulls_and_empty_names_are_rejected(self) -> None
- test_redundant_but_harmless_segments_are_allowed · method · L287-L293 — def test_redundant_but_harmless_segments_are_allowed(self) -> None: # PurePosixPath collapses
. and doubled separators, so these resolve # inside the extraction root and are not treated as ambiguous. Only # .. actually escapes.
- test_symlink_members_are_detected_from_the_mode_bits · method · L295-L302 — def test_symlink_members_are_detected_from_the_mode_bits(self) -> None
- ContainerLimitTests · class · L305-L390 — class ContainerLimitTests(unittest.TestCase)
- test_the_documented_limits_are_positive_and_ordered · method · L306-L321 — def test_the_documented_limits_are_positive_and_ordered(self) -> None: # Every limit exists to stop a zip bomb; a zero or negative one would # disable the guard silently.
- _inspect · method · L323-L328 — def _inspect(self, build) -> dict
- test_a_traversing_member_is_reported_as_an_error · method · L330-L339 — def test_a_traversing_member_is_reported_as_an_error(self) -> None: # The inspector reports rather than raises: the point is to hand back a # full account of what is wrong with an archive, not to stop at the # first problem.
- test_a_symlink_member_is_reported_as_an_error · method · L341-L348 — def test_a_symlink_member_is_reported_as_an_error(self) -> None
- build · function · L342-L345 — def build(handle: zipfile.ZipFile) -> None
- test_a_missing_manifest_is_reported · method · L350-L354 — def test_a_missing_manifest_is_reported(self) -> None
- test_non_positive_limits_are_refused_outright · method · L356-L366 — def test_non_positive_limits_are_refused_outright(self) -> None
- test_a_member_count_over_the_limit_is_reported · method · L368-L375 — def test_a_member_count_over_the_limit_is_reported(self) -> None
- test_a_missing_file_is_refused · method · L377-L380 — def test_a_missing_file_is_refused(self) -> None
- test_a_non_zip_file_is_refused_rather_than_crashing · method · L382-L387 — def test_a_non_zip_file_is_refused_rather_than_crashing(self) -> None
- test_the_manifest_name_is_the_documented_one · method · L389-L390 — def test_the_manifest_name_is_the_documented_one(self) -> None
- XmlHelperTests · class · L393-L396 — class XmlHelperTests(unittest.TestCase)
- test_namespaced_tags_are_reduced_to_their_local_name · method · L394-L396 — def test_namespaced_tags_are_reduced_to_their_local_name(self) -> None