コード例 #1
0
    def setup_class(self):
        print("")
        # get config options
        config = ConfigParser.RawConfigParser({
            'ckan_host': '0.0.0.0',
        })
        config.read(
            os.path.join(os.path.dirname(os.path.abspath(__file__)),
                         'tests_config.cfg'))

        self.host = config.get('tests', 'ckan_host')
        self.path = config.get('tests', 'ckan_ngds_sysadmin_search_path')

        if not self.host:
            raise Exception('You must add a Host to the tests '
                            ' configuration file')

        if not self.path:
            raise Exception(
                'You must add a Ngds SysAdmin Search path to the tests '
                ' configuration file')

#load sysadmin extension
        plugins.load('ngds_sysadmin')

        self.oNgdsSysAdmin = pluginNgdsSysAdmin.SystemAdministrator()
コード例 #2
0
    def setup_class(self):
        print ("")
        # get config options
        config = ConfigParser.RawConfigParser({
            'ckan_host': '0.0.0.0',
        })
        config.read(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                 'tests_config.cfg'))

        self.host = config.get('tests', 'ckan_host')
        self.path = config.get('tests', 'ckan_ngds_sysadmin_search_path')

        if not self.host:
            raise Exception('You must add a Host to the tests '
                            ' configuration file')

        if not self.path:
            raise Exception('You must add a Ngds SysAdmin Search path to the tests '
                            ' configuration file')

	#load sysadmin extension
	plugins.load('ngds_sysadmin')

        self.oNgdsSysAdmin = pluginNgdsSysAdmin.SystemAdministrator()
コード例 #3
0
 def setup_class(cls):
     # Load sysadmin plugin
     plugins.load('ngds_sysadmin')
コード例 #4
0
ファイル: test.py プロジェクト: FuhuXia/ckanext-ngds
 def setup_class(cls):
     # Load sysadmin plugin
     plugins.load('sysadmin')