Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update telemetry settings v1 unit-tests #1517

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# 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.telemetry.tests.test_api_telemetry_settings_views import (
TestTelemetrySettingsView,
TestTelemetrySettingsViewAsNonSubscriber,
Expand All @@ -22,6 +26,16 @@
class TestTelemetrySettingsViewVersion1(TestTelemetrySettingsView):
api_version = API_VERSION

@override_settings(DEBUG=False, DEPLOYMENT_MODE="DUMMY_VALUE")
def test_get_telemetry_settings_non_saas_non_debug(self):
r = self.client.get(self.api_version_reverse("telemetry_settings"))
self.assertEqual(r.status_code, HTTPStatus.NOT_IMPLEMENTED)

@override_settings(DEBUG=False, DEPLOYMENT_MODE="DUMMY_VALUE")
def test_set_telemetry_settings_non_saas_non_debug(self):
r = self.client.post(self.api_version_reverse("telemetry_settings"))
self.assertEqual(r.status_code, HTTPStatus.NOT_IMPLEMENTED)


class TestTelemetrySettingsViewAsNonSubscriberVersion1(TestTelemetrySettingsViewAsNonSubscriber):
api_version = API_VERSION
Loading