diff --git a/descope/management/jwt.py b/descope/management/jwt.py index a69152a75..42181a98b 100644 --- a/descope/management/jwt.py +++ b/descope/management/jwt.py @@ -114,7 +114,7 @@ def stop_impersonation( ) response = self._auth.do_post( - MgmtV1.impersonate_path, + MgmtV1.stop_impersonation_path, { "jwt": jwt, "customClaims": custom_claims, diff --git a/tests/management/test_jwt.py b/tests/management/test_jwt.py index 792a4c4fd..4deb7e837 100644 --- a/tests/management/test_jwt.py +++ b/tests/management/test_jwt.py @@ -167,7 +167,7 @@ def test_stop_impersonation(self): mock_post.return_value = network_resp resp = client.mgmt.jwt.stop_impersonation("jwtstr") self.assertEqual(resp, "response") - expected_uri = f"{common.DEFAULT_BASE_URL}{MgmtV1.impersonate_path}" + expected_uri = f"{common.DEFAULT_BASE_URL}{MgmtV1.stop_impersonation_path}" mock_post.assert_called_with( expected_uri, headers={