Skip to content

Commit

Permalink
remove old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoodfred committed May 4, 2024
1 parent ccd7389 commit 7745932
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions koku/api/report/test/ocp/view/test_ocp_network_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,8 @@
# Copyright 2024 Red Hat Inc.
# SPDX-License-Identifier: Apache-2.0
#
from unittest.mock import patch

from django.urls import reverse
from django_tenants.utils import schema_context
from rest_framework.test import APIClient
from rest_framework.views import status

from api.iam.test.iam_test_case import IamTestCase


class OCPReportViewNetworkTest(IamTestCase):
def test_network_api_access(self):
url = reverse("reports-openshift-network")
client = APIClient()
with (
schema_context(self.schema_name),
patch(
"api.report.ocp.view.UNLEASH_CLIENT.is_enabled",
return_value=False,
),
):
response = client.get(url, **self.headers)

self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)

def test_network_api_access_dev(self):
url = reverse("reports-openshift-network")
client = APIClient()
with (
schema_context(self.schema_name),
patch("api.report.ocp.view.UNLEASH_CLIENT.is_enabled", return_value=True),
):
response = client.get(url, **self.headers)

self.assertEqual(response.status_code, status.HTTP_200_OK)
pass

0 comments on commit 7745932

Please sign in to comment.