Skip to content

Commit d2b8135

Browse files
committed
fix(tests): Restore test_ prefix on mangled test method names
Agent transcript: https://claudescope.sentry.dev/share/xi5AOsxZBlzmnFAlZRDdVp6G32K5Ww2XcLaM5_7N3iI
1 parent 67f32e0 commit d2b8135

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tests/sentry/seer/autofix/test_autofix.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ def test_call_autofix(self, mock_request, mock_get_username) -> None:
13221322

13231323

13241324
class TestGetGithubUsernameForUser(TestCase):
1325-
def testget_github_username_for_user_with_github(self) -> None:
1325+
def test_get_github_username_for_user_with_github(self) -> None:
13261326
"""Tests getting GitHub username from ExternalActor with GitHub provider."""
13271327
from sentry.integrations.models.external_actor import ExternalActor
13281328
from sentry.integrations.types import ExternalProviders
@@ -1343,7 +1343,7 @@ def testget_github_username_for_user_with_github(self) -> None:
13431343
username = get_github_username_for_user(user, organization.id)
13441344
assert username == "testuser"
13451345

1346-
def testget_github_username_for_user_with_github_enterprise(self) -> None:
1346+
def test_get_github_username_for_user_with_github_enterprise(self) -> None:
13471347
"""Tests getting GitHub username from ExternalActor with GitHub Enterprise provider."""
13481348
from sentry.integrations.models.external_actor import ExternalActor
13491349
from sentry.integrations.types import ExternalProviders
@@ -1364,7 +1364,7 @@ def testget_github_username_for_user_with_github_enterprise(self) -> None:
13641364
username = get_github_username_for_user(user, organization.id)
13651365
assert username == "gheuser"
13661366

1367-
def testget_github_username_for_user_without_at_prefix(self) -> None:
1367+
def test_get_github_username_for_user_without_at_prefix(self) -> None:
13681368
"""Tests getting GitHub username when external_name doesn't have @ prefix."""
13691369
from sentry.integrations.models.external_actor import ExternalActor
13701370
from sentry.integrations.types import ExternalProviders
@@ -1385,15 +1385,15 @@ def testget_github_username_for_user_without_at_prefix(self) -> None:
13851385
username = get_github_username_for_user(user, organization.id)
13861386
assert username == "noprefixuser"
13871387

1388-
def testget_github_username_for_user_no_mapping(self) -> None:
1388+
def test_get_github_username_for_user_no_mapping(self) -> None:
13891389
"""Tests that None is returned when user has no GitHub mapping."""
13901390
user = self.create_user()
13911391
organization = self.create_organization()
13921392

13931393
username = get_github_username_for_user(user, organization.id)
13941394
assert username is None
13951395

1396-
def testget_github_username_for_user_non_github_provider(self) -> None:
1396+
def test_get_github_username_for_user_non_github_provider(self) -> None:
13971397
"""Tests that None is returned when user only has non-GitHub external actors."""
13981398
from sentry.integrations.models.external_actor import ExternalActor
13991399
from sentry.integrations.types import ExternalProviders
@@ -1414,7 +1414,7 @@ def testget_github_username_for_user_non_github_provider(self) -> None:
14141414
username = get_github_username_for_user(user, organization.id)
14151415
assert username is None
14161416

1417-
def testget_github_username_for_user_multiple_mappings(self) -> None:
1417+
def test_get_github_username_for_user_multiple_mappings(self) -> None:
14181418
"""Tests that most recent GitHub mapping is used when multiple exist."""
14191419
from sentry.integrations.models.external_actor import ExternalActor
14201420
from sentry.integrations.types import ExternalProviders
@@ -1447,7 +1447,7 @@ def testget_github_username_for_user_multiple_mappings(self) -> None:
14471447
username = get_github_username_for_user(user, organization.id)
14481448
assert username == "newuser"
14491449

1450-
def testget_github_username_for_user_from_commit_author(self) -> None:
1450+
def test_get_github_username_for_user_from_commit_author(self) -> None:
14511451
"""Tests getting GitHub username from CommitAuthor when ExternalActor doesn't exist."""
14521452
from sentry.models.commitauthor import CommitAuthor
14531453

@@ -1466,7 +1466,7 @@ def testget_github_username_for_user_from_commit_author(self) -> None:
14661466
username = get_github_username_for_user(user, organization.id)
14671467
assert username == "githubuser"
14681468

1469-
def testget_github_username_for_user_from_commit_author_github_enterprise(self) -> None:
1469+
def test_get_github_username_for_user_from_commit_author_github_enterprise(self) -> None:
14701470
"""Tests getting GitHub Enterprise username from CommitAuthor."""
14711471
from sentry.models.commitauthor import CommitAuthor
14721472

@@ -1485,7 +1485,7 @@ def testget_github_username_for_user_from_commit_author_github_enterprise(self)
14851485
username = get_github_username_for_user(user, organization.id)
14861486
assert username == "ghuser"
14871487

1488-
def testget_github_username_for_user_external_actor_priority(self) -> None:
1488+
def test_get_github_username_for_user_external_actor_priority(self) -> None:
14891489
"""Tests that ExternalActor is checked before CommitAuthor."""
14901490
from sentry.integrations.models.external_actor import ExternalActor
14911491
from sentry.integrations.types import ExternalProviders
@@ -1516,7 +1516,7 @@ def testget_github_username_for_user_external_actor_priority(self) -> None:
15161516
username = get_github_username_for_user(user, organization.id)
15171517
assert username == "externaluser"
15181518

1519-
def testget_github_username_for_user_commit_author_no_external_id(self) -> None:
1519+
def test_get_github_username_for_user_commit_author_no_external_id(self) -> None:
15201520
"""Tests that None is returned when CommitAuthor exists but has no external_id."""
15211521
from sentry.models.commitauthor import CommitAuthor
15221522

@@ -1535,7 +1535,7 @@ def testget_github_username_for_user_commit_author_no_external_id(self) -> None:
15351535
username = get_github_username_for_user(user, organization.id)
15361536
assert username is None
15371537

1538-
def testget_github_username_for_user_wrong_organization(self) -> None:
1538+
def test_get_github_username_for_user_wrong_organization(self) -> None:
15391539
"""Tests that CommitAuthor from different organization is not used."""
15401540
from sentry.models.commitauthor import CommitAuthor
15411541

@@ -1555,7 +1555,7 @@ def testget_github_username_for_user_wrong_organization(self) -> None:
15551555
username = get_github_username_for_user(user, organization1.id)
15561556
assert username is None
15571557

1558-
def testget_github_username_for_user_unverified_email_not_matched(self) -> None:
1558+
def test_get_github_username_for_user_unverified_email_not_matched(self) -> None:
15591559
"""Tests that unverified emails don't match CommitAuthor (security requirement)."""
15601560
from sentry.models.commitauthor import CommitAuthor
15611561

@@ -1578,7 +1578,7 @@ def testget_github_username_for_user_unverified_email_not_matched(self) -> None:
15781578
username = get_github_username_for_user(user, organization.id)
15791579
assert username is None
15801580

1581-
def testget_github_username_for_user_verified_secondary_email_matched(self) -> None:
1581+
def test_get_github_username_for_user_verified_secondary_email_matched(self) -> None:
15821582
"""Tests that verified secondary emails DO match CommitAuthor."""
15831583
from sentry.models.commitauthor import CommitAuthor
15841584

0 commit comments

Comments
 (0)