|
| 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. |
1 | 16 | from http import HTTPStatus
|
2 | 17 |
|
3 | 18 | from django.test import override_settings
|
4 | 19 |
|
| 20 | +from ansible_ai_connect.ai.api.model_pipelines.tests import mock_config |
5 | 21 | from ansible_ai_connect.test_utils import (
|
| 22 | + APIVersionTestCaseBase, |
6 | 23 | WisdomAppsBackendMocking,
|
7 | 24 | WisdomServiceAPITestCaseBase,
|
8 | 25 | )
|
9 | 26 |
|
10 | 27 |
|
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 | +): |
13 | 34 | def test_ok(self):
|
14 | 35 | payload = {}
|
15 | 36 | self.client.force_authenticate(user=self.user)
|
|
0 commit comments