Skip to content

Commit

Permalink
Fix role explanation view test
Browse files Browse the repository at this point in the history
  • Loading branch information
mabashian committed Feb 10, 2025
1 parent 8ed9346 commit 5ac8709
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions ansible_ai_connect/ai/api/tests/test_role_explanation_view.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
#!/usr/bin/env python3

# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from http import HTTPStatus

from django.test import override_settings

from ansible_ai_connect.ai.api.model_pipelines.tests import mock_config
from ansible_ai_connect.test_utils import (
APIVersionTestCaseBase,
WisdomAppsBackendMocking,
WisdomServiceAPITestCaseBase,
)


@override_settings(ANSIBLE_AI_MODEL_MESH_API_TYPE="dummy")
class TestRoleGenerationView(WisdomAppsBackendMocking, WisdomServiceAPITestCaseBase):
@override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True)
@override_settings(ANSIBLE_AI_MODEL_MESH_CONFIG=mock_config("dummy"))
@override_settings(SEGMENT_WRITE_KEY="DUMMY_KEY_VALUE")
class TestRoleExplanationView(
APIVersionTestCaseBase, WisdomAppsBackendMocking, WisdomServiceAPITestCaseBase
):
def test_ok(self):
payload = {}
self.client.force_authenticate(user=self.user)
Expand Down

0 comments on commit 5ac8709

Please sign in to comment.