Example #1
0
 def setUp(self):
     self.recorderklass = self.RecorderMock
     #self.recorderklass = Recorder
     self.tmppath = mkdtemp()
     # To reset dispatcher in each tests.
     context.set('dispatcher', None)
     context.delete('dispatcher')
 def setUp(self):
     self.recorderklass = self.RecorderMock
     #self.recorderklass = Recorder
     self.tmppath = mkdtemp()
     # To reset dispatcher in each tests.
     context.set('dispatcher', None)
     context.delete('dispatcher')
    def setUp(self):
        self.tmppath = mkdtemp()

        repo = repository.Repository(self.tmppath)
        context.set('repository', repo)

        conf = Conf()
        context.set('conf', conf)
Example #4
0
    def setUp(self):
        self.tmppath = mkdtemp()

        repo = repository.Repository(self.tmppath)
        context.set('repository', repo)

        conf = Conf()
        context.set('conf', conf)
Example #5
0
 def test_getter_setter(self):
     service_name = 'pr'
     service = 'Service'
     other_service = 'Other service'
     self.assertRaises(KeyError, context.get, service_name)
     context.set(service_name, service)
     self.assertEqual(service, context.get(service_name))
     context.set(service_name, other_service)
     self.assertNotEqual(service, context.get(service_name))
     self.assertEqual(other_service, context.get(service_name))
     context.delete(service_name)
     self.assertRaises(KeyError, context.get, service_name)
    def setUp(self):
        for service_name in ['conf', 'dispatcher', 'mainwindow', 'heartbeat',
                             'repository', 'occlient', 'scheduler']:
            if context.has(service_name):
                context.delete(service_name)

        self.conf_file = get_resource('conf/conf.ini')
        self.backup_conf_file =get_resource('conf/conf.backup.ini')
        dist_file = get_resource('conf/conf-dist.ini')

        shutil.copyfile(self.conf_file,self.backup_conf_file)
        self.conf = Conf(self.conf_file,dist_file)
        context.set('conf',self.conf)
        self.conf.reload()
Example #7
0
    def setUp(self):
        for service_name in [
                'conf', 'dispatcher', 'mainwindow', 'heartbeat', 'repository',
                'occlient', 'scheduler'
        ]:
            if context.has(service_name):
                context.delete(service_name)

        self.conf_file = get_resource('conf/conf.ini')
        self.backup_conf_file = get_resource('conf/conf.backup.ini')
        dist_file = get_resource('conf/conf-dist.ini')

        shutil.copyfile(self.conf_file, self.backup_conf_file)
        self.conf = Conf(self.conf_file, dist_file)
        context.set('conf', self.conf)
        self.conf.reload()
    def setUp(self):
        self.tmppath = mkdtemp()

        repo = repository.Repository(self.tmppath)
        context.set('repository', repo)

        # conf = Conf()
        # context.set('conf', conf)

        self.conf_file = get_resource('conf/conf.ini')
        self.backup_conf_file =get_resource('conf/conf.backup.ini')
        dist_file = get_resource('conf/conf-dist.ini')

        shutil.copyfile(self.conf_file,self.backup_conf_file)
        self.conf = Conf(self.conf_file,dist_file)
        self.conf.reload()
Example #9
0
    def setUp(self):
        self.tmppath = mkdtemp()

        repo = repository.Repository(self.tmppath)
        context.set('repository', repo)

        # conf = Conf()
        # context.set('conf', conf)

        self.conf_file = get_resource('conf/conf.ini')
        self.backup_conf_file = get_resource('conf/conf.backup.ini')
        dist_file = get_resource('conf/conf-dist.ini')

        shutil.copyfile(self.conf_file, self.backup_conf_file)
        self.conf = Conf(self.conf_file, dist_file)
        self.conf.reload()