diff --git a/critiquebrainz/frontend/views/test/test_login.py b/critiquebrainz/frontend/views/test/test_login.py index 82ace6f8..eec4423e 100644 --- a/critiquebrainz/frontend/views/test/test_login.py +++ b/critiquebrainz/frontend/views/test/test_login.py @@ -20,14 +20,14 @@ def test_login_oauth(self, mock_requests): """ Tests that creating a new user, update MB username and login to CB updates MB username in CB db """ row_id = 1111 - mock_requests.post("https://musicbrainz.org/oauth2/token", json={ + mock_requests.post("https://musicbrainz.org/new-oauth2/token", json={ "access_token": "UF7GvG2pl70jTogIwOhD32BhI_aIevPF", "expires_in": 3600, "token_type": "Bearer", "refresh_token": "GjSCBBjp4fnbE0AKo3uFu9qq9K2fFm4u" }) - mock_requests.get("https://musicbrainz.org/oauth2/userinfo", json={ + mock_requests.get("https://musicbrainz.org/new-oauth2/userinfo", json={ "sub": "old-user-name", "metabrainz_user_id": row_id }) @@ -46,7 +46,7 @@ def test_login_oauth(self, mock_requests): self.client.get(url_for("login.logout")) # change MB username without changing display name, musicbrainz id in database should update - mock_requests.get("https://musicbrainz.org/oauth2/userinfo", json={ + mock_requests.get("https://musicbrainz.org/new-oauth2/userinfo", json={ "sub": "new-user-name", "metabrainz_user_id": row_id }) @@ -68,7 +68,7 @@ def test_login_oauth(self, mock_requests): db_users.update(user["id"], {"display_name": "custom-display-name"}) # change MB username, musicbrainz id in database should not update because display name is different - mock_requests.get("https://musicbrainz.org/oauth2/userinfo", json={ + mock_requests.get("https://musicbrainz.org/new-oauth2/userinfo", json={ "sub": "another-new-user-name", "metabrainz_user_id": row_id }) diff --git a/custom_config.py.example b/custom_config.py.example index 121a5909..15666c95 100644 --- a/custom_config.py.example +++ b/custom_config.py.example @@ -27,7 +27,7 @@ SECRET_KEY = "CHANGE_THIS" #MUSICBRAINZ_USERAGENT = "CritiqueBrainz Custom" MUSICBRAINZ_CLIENT_ID = "" MUSICBRAINZ_CLIENT_SECRET = "" -MUSICBRAINZ_OAUTH_URL = "" +MUSICBRAINZ_OAUTH_URL = "https://musicbrainz.org/new-oauth2" # Server with Spotify mappings # https://github.com/metabrainz/mbspotify