Ejemplo n.º 1
0
def get_test_magnum_service_object(context, **kw):
    """Return a test magnum_service object.

    Get a magnum_service from DB layer and return an object with
    appropriate attributes.
    """
    db_magnum_service = db_utils.get_test_magnum_service(**kw)
    magnum_service = objects.MagnumService(context)
    for key in db_magnum_service:
        setattr(magnum_service, key, db_magnum_service[key])
    return magnum_service
Ejemplo n.º 2
0
def get_test_magnum_service_object(context, **kw):
    """Return a test magnum_service object.

    Get a magnum_service from DB layer and return an object with
    appropriate attributes.
    """
    db_magnum_service = db_utils.get_test_magnum_service(**kw)
    magnum_service = objects.MagnumService(context)
    for key in db_magnum_service:
        setattr(magnum_service, key, db_magnum_service[key])
    return magnum_service
Ejemplo n.º 3
0
 def setUp(self):
     super(TestMagnumServiceObject, self).setUp()
     self.fake_magnum_service = utils.get_test_magnum_service()
Ejemplo n.º 4
0
 def setUp(self):
     super(TestMagnumServiceObject, self).setUp()
     self.fake_magnum_service = utils.get_test_magnum_service()