示例#1
0
    def setUpClass(cls):
        super(ClassesDaoTests, cls).setUpClass()
        # Make that instances of classs and instances dao point the mocks
        cls.dao_mock = ServiceClassDao()
        cls.dao = ServiceClassDao()

        # monkey patching daos for the execution of this class
        cls.patcher_coll = patch.object(cls.dao_mock, 'dbcoll',
                                        cls.mock_coll)  # @UndefinedVariable
        cls.patcher_coll.start()
示例#2
0
 def setUp(self):
     self.class_ = {
         '_id': 'test',
         'description': 'Descripcion test',
         'default_version': "1.0"
     }
     self.instance = {
         'uri': 'http://test',
         'version': '1.0',
         'class_name': 'test'
     }
     self.instance_new = {
         'uri': 'http://testNew',
         'version': '1.0',
         'class_name': 'test'
     }
     self.dao = ServiceInstanceDao()
     self.classes_dao = ServiceClassDao()
     self.classes_dao.create(self.class_)
     self.dao.create(self.instance)
     super(InstancesDaoTests, self).setUp()
示例#3
0
 def __init__(self):
     self.binding_dao = BindingDao()
     self.class_dao = ServiceClassDao()
     self.instance_dao = ServiceInstanceDao()
示例#4
0
 def __init__(self):
     self.dao = UserAdminDao()
     self.classes_dao = ServiceClassDao()