Skip to content

Commit 5ac8709

Browse files
committed
Fix role explanation view test
1 parent 8ed9346 commit 5ac8709

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

ansible_ai_connect/ai/api/tests/test_role_explanation_view.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
1+
#!/usr/bin/env python3
2+
3+
# Copyright Red Hat
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
116
from http import HTTPStatus
217

318
from django.test import override_settings
419

20+
from ansible_ai_connect.ai.api.model_pipelines.tests import mock_config
521
from ansible_ai_connect.test_utils import (
22+
APIVersionTestCaseBase,
623
WisdomAppsBackendMocking,
724
WisdomServiceAPITestCaseBase,
825
)
926

1027

11-
@override_settings(ANSIBLE_AI_MODEL_MESH_API_TYPE="dummy")
12-
class TestRoleGenerationView(WisdomAppsBackendMocking, WisdomServiceAPITestCaseBase):
28+
@override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True)
29+
@override_settings(ANSIBLE_AI_MODEL_MESH_CONFIG=mock_config("dummy"))
30+
@override_settings(SEGMENT_WRITE_KEY="DUMMY_KEY_VALUE")
31+
class TestRoleExplanationView(
32+
APIVersionTestCaseBase, WisdomAppsBackendMocking, WisdomServiceAPITestCaseBase
33+
):
1334
def test_ok(self):
1435
payload = {}
1536
self.client.force_authenticate(user=self.user)

0 commit comments

Comments
 (0)