Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/2383.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Resolved E501 line too long errors in test_signing.py.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ known-third-party = ["build"]
[tool.ruff.lint.per-file-ignores]
# E501: line too long, to be fixed in future changes
"tests/integrations/*" = ["E501"]
"tests/platforms/*" = ["E501"]

[tool.rumdl]
flavor = "mkdocs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
("Python app launched & stored in Android Activity class", True),
),
(
"\x1b[32mI/python.stdout: Python app launched & stored in Android Activity class\x1b[0m",
"\x1b[32mI/python.stdout: Python app launched & "
"stored in Android Activity class\x1b[0m",
("Python app launched & stored in Android Activity class", True),
),
(
Expand All @@ -68,7 +69,8 @@
("test_case (tests.foobar.test_other.TestOtherMethods)", True),
),
(
"\x1b[32mI/python.stderr: test_case (tests.foobar.test_other.TestOtherMethods)\x1b[0m",
"\x1b[32mI/python.stderr: test_case "
"(tests.foobar.test_other.TestOtherMethods)\x1b[0m",
("test_case (tests.foobar.test_other.TestOtherMethods)", True),
),
(
Expand Down
123 changes: 92 additions & 31 deletions tests/platforms/macOS/app/test_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ def test_explicit_app_identity_checksum(dummy_command):
"""If the user nominates an app identity by checksum, it is used."""
# get_identities will return some options.
dummy_command.get_identities.return_value = {
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
}

# The identity will be the one the user specified as an option.
Expand All @@ -122,8 +126,12 @@ def test_explicit_app_identity_name(dummy_command):
"""If the user nominates an app identity by name, it is used."""
# get_identities will return some options.
dummy_command.get_identities.return_value = {
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
}

# The identity will be the one the user specified as an option.
Expand All @@ -142,8 +150,12 @@ def test_invalid_app_identity_name(dummy_command):
"""If the user nominates an app identity by name, it is used."""
# get_identities will return some options.
dummy_command.get_identities.return_value = {
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
}

# The identity will be the one the user specified as an option.
Expand Down Expand Up @@ -198,8 +210,12 @@ def test_select_app_identity(dummy_command):
"""The user can select from a list of app identities."""
# get_identities will return some options.
dummy_command.get_identities.return_value = {
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
}

# Return option 3
Expand All @@ -221,8 +237,12 @@ def test_select_app_identity_no_adhoc(dummy_command):
"""Adhoc identities can be excluded from the list of options."""
# get_identities will return some options.
dummy_command.get_identities.return_value = {
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
}

# Return option 2
Expand All @@ -248,13 +268,21 @@ def test_select_installer_identity(dummy_command):
dummy_command.get_identities.side_effect = [
{
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
},
{
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"4C1067833814CE4738EBD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"8903EC63C238B04C138EBD6F067833814CE47CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)",
"4C1067833814CE4738EBD6F8903EC63C238B0CA3": (
"Developer ID Installer: Example Corp Ltd (Z2K4383DLE)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
"8903EC63C238B04C138EBD6F067833814CE47CA3": (
"Developer ID Installer: Example Corp Ltd (Z2K4383DLE)"
),
},
]

Expand All @@ -281,26 +309,45 @@ def test_select_installer_identity(dummy_command):
def test_installer_identity_matching_app(dummy_command):
"""The list of possible installer identities includes non-app identities from the
same team."""
# get_identities is invoked twice - once with app identities, and once with all identities.
# get_identities is invoked twice - once with app identities, and once with
# all identities.
dummy_command.get_identities.side_effect = [
{
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
"EBD6F8903EC63C238B0384C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (83DLEZ2K43)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
},
{
# The app identity that will be selected
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
# A different app identity
"EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)",
"EBD6F8903EC63C238B0384C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (83DLEZ2K43)"
),
# An installer identity that doesn't match the selected app identity
"1067833814CE4738EB4CD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)",
"1067833814CE4738EB4CD6F8903EC63C238B0CA3": (
"Developer ID Installer: Example Corp Ltd (83DLEZ2K43)"
),
# An installer identity that *does* match the selected app identity
"4C1067833814CE4738EBD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)",
"4C1067833814CE4738EBD6F8903EC63C238B0CA3": (
"Developer ID Installer: Example Corp Ltd (Z2K4383DLE)"
),
# A different app identity
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
# Another installer identity that match the selected app identity
"8903EC63C238B04C138EBD6F067833814CE47CA3": "Developer ID Installer: Example Corp Ltd (Z2K4383DLE)",
"8903EC63C238B04C138EBD6F067833814CE47CA3": (
"Developer ID Installer: Example Corp Ltd (Z2K4383DLE)"
),
},
]

Expand Down Expand Up @@ -331,19 +378,33 @@ def test_installer_identity_no_match(dummy_command):
# get_identities is invoked twice - once with app identities, and once with all identities.
dummy_command.get_identities.side_effect = [
{
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
"EBD6F8903EC63C238B0384C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (83DLEZ2K43)"
),
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
},
{
# The app identity that will be selected
"38EBD6F8903EC63C238B04C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (Z2K4383DLE)",
"38EBD6F8903EC63C238B04C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (Z2K4383DLE)"
),
# A different app identity
"EBD6F8903EC63C238B0384C1067833814CE47CA3": "Developer ID Application: Example Corp Ltd (83DLEZ2K43)",
"EBD6F8903EC63C238B0384C1067833814CE47CA3": (
"Developer ID Application: Example Corp Ltd (83DLEZ2K43)"
),
# An installer identity that doesn't match the selected app identity
"1067833814CE4738EB4CD6F8903EC63C238B0CA3": "Developer ID Installer: Example Corp Ltd (83DLEZ2K43)",
"1067833814CE4738EB4CD6F8903EC63C238B0CA3": (
"Developer ID Installer: Example Corp Ltd (83DLEZ2K43)"
),
# A different app identity
"11E77FB58F13F6108B38110D5D92233C58ED38C5": "iPhone Developer: Jane Smith (BXAH5H869S)",
"11E77FB58F13F6108B38110D5D92233C58ED38C5": (
"iPhone Developer: Jane Smith (BXAH5H869S)"
),
},
]

Expand Down
Loading