File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
src/sentry/prevent/endpoints
tests/sentry/prevent/endpoints Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def get(
6161
6262 response_data : dict [str , Any ] = deepcopy (PREVENT_AI_CONFIG_DEFAULT )
6363 if config :
64- response_data ["organization" ][ git_organization_name ] = config .data
64+ response_data ["organization" ] = config .data
6565
6666 return Response (response_data , status = 200 )
6767
@@ -103,6 +103,6 @@ def put(
103103 )
104104
105105 response_data : dict [str , Any ] = deepcopy (PREVENT_AI_CONFIG_DEFAULT )
106- response_data ["organization" ][ git_organization_name ] = request .data
106+ response_data ["organization" ] = request .data
107107
108108 return Response (response_data , status = 200 )
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def test_get_returns_config_when_exists(self):
6666
6767 resp = self .client .get (self .url )
6868 assert resp .status_code == 200
69- assert resp .data ["organization" ][ self . git_org ] == VALID_ORG_CONFIG
69+ assert resp .data ["organization" ] == VALID_ORG_CONFIG
7070
7171 def test_get_returns_404_when_integration_not_found (self ):
7272 """Test GET endpoint returns 404 when GitHub integration doesn't exist."""
@@ -88,7 +88,7 @@ def test_put_with_valid_config_creates_entry(self):
8888 """Test PUT endpoint creates a new configuration entry."""
8989 resp = self .client .put (self .url , data = VALID_ORG_CONFIG , format = "json" )
9090 assert resp .status_code == 200
91- assert resp .data ["organization" ][ self . git_org ] == VALID_ORG_CONFIG
91+ assert resp .data ["organization" ] == VALID_ORG_CONFIG
9292
9393 config = PreventAIConfiguration .objects .get (
9494 organization_id = self .org .id , integration_id = self .integration .id
@@ -191,8 +191,6 @@ def test_config_with_repo_overrides(self):
191191 resp = self .client .get (self .url )
192192 assert resp .status_code == 200
193193 assert (
194- resp .data ["organization" ][self .git_org ]["repo_overrides" ]["my-repo" ]["bug_prediction" ][
195- "sensitivity"
196- ]
194+ resp .data ["organization" ]["repo_overrides" ]["my-repo" ]["bug_prediction" ]["sensitivity" ]
197195 == "high"
198196 )
You can’t perform that action at this time.
0 commit comments