# Path: tests/unit/test.py
# class TestCase(testtools.TestCase):
#     def setUp(self):
#     def mock_config(self, update=None):
#     def post(self, *args, **kwargs):
#     def put(self, *args, **kwargs):
#     def delete(self, *args, **kwargs):
#     def get(self, *args, **kwargs):


import mock
from tests.unit import test
            "services": {},
        }
        self.mock_config(self.config)

    @mock.patch("ceagle.api.client.get_client")
    def test_status_health_api(self, mock_get_client):
        mock_get_client.return_value.get.return_value = ({"test": 1}, 200)
        resp = self.get("/api/v1/status/health/day")
        self.assertEqual((200, {"test": 1}), resp)
        mock_get_client.return_value.get.assert_called_once_with(
            "/api/v1/health/day")

    @mock.patch("ceagle.api.client.get_client")
    def test_region_status_health_api(self, mock_get_client):
        mock_get_client.return_value.get.return_value = ({"test": 2}, 200)
        resp = self.get("/api/v1/region/test_region/status/health/day")
        self.assertEqual((200, {"test": 2}), resp)
        mock_get_client.return_value.get.assert_called_with(
            "/api/v1/region/test_region/health/day")

    def test_health_api_no_endpoint(self):
        code, resp = self.get("/api/v1/status/health/day")
        self.assertEqual(404, code)
        self.assertEqual({"error": "Unknown service 'health'"}, resp)

        code, resp = self.get("/api/v1/region/test_region/status/health/day")
        self.assertEqual(404, code)
        self.assertEqual({"error": "Unknown service 'health'"}, resp)



# Path: tests/unit/test.py
# class TestCase(testtools.TestCase):
#     def setUp(self):
#     def mock_config(self, update=None):
#     def post(self, *args, **kwargs):
#     def put(self, *args, **kwargs):
#     def delete(self, *args, **kwargs):
#     def get(self, *args, **kwargs):


# Path: tests/unit/api/v1/test_status.py
import mock
from tests.unit import test

            "services": {},
        }
        self.mock_config(self.config)

    @mock.patch("ceagle.api.client.get_client")
    def test_status_health_api(self, mock_get_client):
        mock_get_client.return_value.get.return_value = ({"test": 1}, 200)
        resp = self.get("/api/v1/status/health/day")
        self.assertEqual((200, {"test": 1}), resp)
        mock_get_client.return_value.get.assert_called_once_with(
            "/api/v1/health/day")

    @mock.patch("ceagle.api.client.get_client")
    def test_region_status_health_api(self, mock_get_client):
        mock_get_client.return_value.get.return_value = ({"test": 2}, 200)
        resp = self.get("/api/v1/region/test_region/status/health/day")
        self.assertEqual((200, {"test": 2}), resp)
        mock_get_client.return_value.get.assert_called_with(
            "/api/v1/region/test_region/health/day")

    def test_health_api_no_endpoint(self):
        code, resp = self.get("/api/v1/status/health/day")
        self.assertEqual(404, code)
        self.assertEqual({"error": "Unknown service 'health'"}, resp)

        code, resp = self.get("/api/v1/region/test_region/status/health/day")
        self.assertEqual(404, code)
        self.assertEqual({"error": "Unknown service 'health'"}, resp)



class AvailabilityApiTestCase(test.TestCase):