# 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 collections
import mock
from tests.unit import test
        self.mock_config({
            "use_fake_api_data": False,
        })
        self.mock_services(collections.OrderedDict([
            ("availability", "foo_endpoint"),
            ("health", "foo_endpoint"),
            ("infra", {}),
        ]))

    def mock_services(self, services):
        patch = mock.patch.dict("oss_lib.config._CONF", {
            "services": services,
        })
        patch.start()
        self.addCleanup(patch.stop)

    @mock.patch("ceagle.api.client.get_client")
    def test_get_regions(self, mock_get_client):
        mock_get_client.return_value.get.side_effect = [
            (["a1", "b1", "c1"], 200),
            (["b1", "d1", "e1"], 200),
        ]
        code, resp = self.get("/api/v1/regions")
        self.assertEqual(200, code)
        resp["regions"].sort()
        self.assertEqual({"regions": ["a1", "b1", "c1", "d1", "e1"]}, resp)

    @mock.patch("ceagle.api.client.get_client")
    def test_get_resions_detailed(self, mock_get_client):
        mock_get_client.return_value.get.side_effect = [

# 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_regions.py
import collections
import mock
from tests.unit import test

        self.mock_config({
            "use_fake_api_data": False,
        })
        self.mock_services(collections.OrderedDict([
            ("availability", "foo_endpoint"),
            ("health", "foo_endpoint"),
            ("infra", {}),
        ]))

    def mock_services(self, services):
        patch = mock.patch.dict("oss_lib.config._CONF", {
            "services": services,
        })
        patch.start()
        self.addCleanup(patch.stop)

    @mock.patch("ceagle.api.client.get_client")
    def test_get_regions(self, mock_get_client):
        mock_get_client.return_value.get.side_effect = [
            (["a1", "b1", "c1"], 200),
            (["b1", "d1", "e1"], 200),
        ]
        code, resp = self.get("/api/v1/regions")
        self.assertEqual(200, code)
        resp["regions"].sort()
        self.assertEqual({"regions": ["a1", "b1", "c1", "d1", "e1"]}, resp)

    @mock.patch("ceagle.api.client.get_client")
    def test_get_resions_detailed(self, mock_get_client):
        mock_get_client.return_value.get.side_effect = [

            (["a2", "b2", "c2"], 200),