예제 #1
0
 def test_ndt_params_get(self, resp_mock, request_mock):
     cont = pd.ParameterDefinitionsController()
     resp = cont.get_one('ndt_params')
     self.assertIsNotNone(resp)
     self.assertEqual(200, resp_mock.status)
     self.assertEqual('parameter_definitions', resp['result'].type)
     self.assertEqual('Solum_CAMP_NDT_parameters', resp['result'].name)
예제 #2
0
파일: root.py 프로젝트: prayalankar2/solum
class Controller(rest.RestController):
    """CAMP API version 1.1 controller root."""

    assemblies = assemblies.AssembliesController()
    attribute_definitions = (
        attribute_definitions.AttributeDefinitionsController())
    extensions = extensions.ExtensionsController()
    formats = formats.FormatsController()
    parameter_definitions = (
        parameter_definitions.ParameterDefinitionsController())
    plans = plans.PlansController()
    platform = platform.PlatformController()
    services = services.ServicesController()
    type_definitions = type_definitions.TypeDefinitionsController()
예제 #3
0
 def test_parameter_def_get_not_found(self, resp_mock, request_mock):
     cont = pd.ParameterDefinitionsController()
     resp = cont.get_one('does_not_exist')
     self.assertIsNotNone(resp)
     self.assertEqual(404, resp_mock.status)