

def test_extensions_get(self, ExtensionHandler, resp_mock, request_mock):
    hand_get_all = ExtensionHandler.return_value.get_all
    fake_extension = fakes.FakeExtension()
    hand_get_all.return_value = [fake_extension]
    cont = extensions.ExtensionsController()
    resp = cont.get()
    self.assertIsNotNone(resp)
    self.assertEqual(200, resp_mock.status)
    self.assertIsNotNone(resp['result'].extension_links)
    extension_links = resp['result'].extension_links
    self.assertEqual(1, len(extension_links))
    self.assertEqual(fake_extension.name, extension_links[0].target_name)

dataset/ETHPy150Open openstack/solum/solum/tests/api/camp/v1_1/test_extensions.py TestExtensions.test_extensions_get/original