diff --git a/upload/helpers.py b/upload/helpers.py index 838b5c7485..380b17cc1a 100644 --- a/upload/helpers.py +++ b/upload/helpers.py @@ -387,7 +387,7 @@ def try_to_get_best_possible_bot_token( try: github_token = get_github_integration_token( repository.author.service, - installation_id=ghapp_installation_id, + integration_id=ghapp_installation_id, ) return dict(key=github_token) except InvalidInstallationError: diff --git a/upload/tests/test_helpers.py b/upload/tests/test_helpers.py index 33aae63a09..b0540466e3 100644 --- a/upload/tests/test_helpers.py +++ b/upload/tests/test_helpers.py @@ -99,9 +99,7 @@ def test_try_to_get_best_possible_bot_token_using_integration( assert try_to_get_best_possible_bot_token(repository) == { "key": "test-token", } - get_github_integration_token.assert_called_once_with( - "github", installation_id=12345 - ) + get_github_integration_token.assert_called_once_with("github", integration_id=12345) @patch("upload.helpers.get_github_integration_token") @@ -125,9 +123,7 @@ def test_try_to_get_best_possible_bot_token_using_invalid_integration( "key": "bornana", "secret": None, } - get_github_integration_token.assert_called_once_with( - "github", installation_id=12345 - ) + get_github_integration_token.assert_called_once_with("github", integration_id=12345) def test_try_to_get_best_possible_nothing_and_is_private(db):