def setUpClass(cls):
     ''' 'test' workspace cannot exist in the test catalog'''
     cls.cat = utils.getGeoServerCatalog()
     utils.cleanCatalog(cls.cat.catalog)
     cls.cat.catalog.create_workspace(WORKSPACE, "http://geoserver.com")
     cls.ws = cls.cat.catalog.get_workspace(WORKSPACE)
     assert cls.ws is not None
 def setUpClass(cls):
     ''' 'test' workspace cannot exist in the test catalog'''
     cls.cat = utils.getGeoServerCatalog()
     utils.cleanCatalog(cls.cat.catalog)
     cls.cat.catalog.create_workspace(WORKSPACE, "http://geoserver.com")
     cls.ws = cls.cat.catalog.get_workspaces(WORKSPACE)[0]        
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "test.qgs")
     iface.addProject(projectFile)
 def setUpClass(cls):
     cls.explorer = GeoServerExplorer()
     # check if context is a PKI auth context
     if hasattr(cls, 'authm') and cls.authm:
         cls.catWrapper = utils.getGeoServerCatalog(authcfgid=AUTHCFGID, authtype=AUTHTYPE)
     else:
         cls.catWrapper = utils.getGeoServerCatalog()
     cls.cat = cls.catWrapper.catalog
     utils.populateCatalog(cls.cat)
     cls.catalogItem = GsCatalogItem(cls.cat, "catalog")
     cls.explorer.explorerTree.gsItem.addChild(cls.catalogItem)
     cls.catalogItem.populate()
     cls.tree = cls.explorer.tree
     # @TODO - make tests pass using importer
     cls.useRestApi = QSettings().setValue("/GeoServer/Settings/GeoServer/UseRestApi", True)
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "test.qgs")
     iface.addProject(projectFile)
 def setUpClass(cls):
     ''' 'test' workspace cannot exist in the test catalog'''
     cls.cat = utils.getGeoServerCatalog()
     utils.cleanCatalog(cls.cat.catalog)
     cls.cat.catalog.create_workspace(WORKSPACE, "http://geoserver.com")
     cls.ws = cls.cat.catalog.get_workspaces(WORKSPACE)[0]
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "data", "test_font.qgs")
     iface.addProject(projectFile)
 def setUpClass(cls):
     ''' 'test' workspace cannot exist in the test catalog'''
     cls.cat = utils.getGeoServerCatalog()
     utils.cleanCatalog(cls.cat.catalog)
     cls.cat.catalog.create_workspace(WORKSPACE, "http://geoserver.com")
     cls.ws = cls.cat.catalog.get_workspace(WORKSPACE)
     assert cls.ws is not None
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "test.qgs")
     if os.path.normcase(projectFile) != os.path.normcase(QgsProject.instance().fileName()):
         iface.addProject(projectFile)
 def setUpClass(cls):
     cls.explorer = GeoServerExplorer()
     cls.cat = utils.getGeoServerCatalog().catalog
     utils.populateCatalog(cls.cat)
     cls.catalogItem = GsCatalogItem(cls.cat, "catalog")
     cls.explorer.explorerWidget.gsItem.addChild(cls.catalogItem)
     cls.catalogItem.populate()
     cls.tree = cls.explorer.tree
     # @TODO - make tests pass using importer
     cls.useRestApi = QSettings().setValue("/GeoServer/Settings/GeoServer/UseRestApi", True)
Example #7
0
 def setUpClass(cls):
     cls.explorer = GeoServerExplorer()
     # Disable cache
     cls.cache_time = QSettings().value(SETTINGS_CACHE_TIME)
     QSettings().setValue(SETTINGS_CACHE_TIME, 1)
     # check if context is a PKI auth context
     if hasattr(cls, 'authm') and cls.authm:
         cls.catWrapper = utils.getGeoServerCatalog(authcfgid=AUTHCFGID, authtype=AUTHTYPE)
     else:
         cls.catWrapper = utils.getGeoServerCatalog()
     cls.cat = cls.catWrapper.catalog
     utils.populateCatalog(cls.cat)
     cls.catalogItem = GsCatalogItem(cls.cat, "catalog")
     cls.explorer.explorerTree.gsItem.addChild(cls.catalogItem)
     cls.catalogItem.populate()
     cls.tree = cls.explorer.tree
     # @TODO - make tests pass using importer
     cls.useRestApi = QSettings().setValue("/GeoServer/Settings/GeoServer/UseRestApi", True)
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "test.qgs")
     iface.addProject(projectFile)
 def setUpClass(cls):
     ''' 'test' workspace cannot exist in the test catalog'''
     cls.cat = utils.getGeoServerCatalog()
     utils.cleanCatalog(cls.cat.catalog)
     cls.cat.catalog.create_workspace(WORKSPACE, "http://geoserver.com")
     cls.ws = cls.cat.catalog.get_workspace(WORKSPACE)
     assert cls.ws is not None
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "data", "test.qgs")
     if os.path.normcase(projectFile) != os.path.normcase(
             QgsProject.instance().fileName()):
         iface.addProject(projectFile)
 def setUpClass(cls):
     cls.explorer = GeoServerExplorer()
     cls.catWrapper = utils.getGeoServerCatalog()
     cls.cat = cls.catWrapper.catalog
     utils.populateCatalog(cls.cat)
     cls.catalogItem = GsCatalogItem(cls.cat, "catalog")
     cls.explorer.explorerTree.gsItem.addChild(cls.catalogItem)
     cls.catalogItem.populate()
     cls.tree = cls.explorer.tree
     # @TODO - make tests pass using importer
     cls.useRestApi = QSettings().setValue("/GeoServer/Settings/GeoServer/UseRestApi", True)
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "test.qgs")
     if os.path.normcase(projectFile) != os.path.normcase(QgsProject.instance().fileName()):
         iface.addProject(projectFile)
Example #10
0
 def setUpClass(cls):
     cls.explorer = GeoServerExplorer()
     # Disable cache
     cls.cache_time = pluginSetting("AuthCatalogXMLCacheTime")
     setPluginSetting("AuthCatalogXMLCacheTime", 1)
     cls.catWrapper = utils.getGeoServerCatalog()
     cls.cat = cls.catWrapper.catalog
     utils.populateCatalog(cls.cat)
     cls.catalogItem = GsCatalogItem(cls.cat, "catalog")
     cls.explorer.explorerTree.gsItem.addChild(cls.catalogItem)
     cls.catalogItem.populate()
     cls.tree = cls.explorer.tree
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "data", "test.qgs")
     iface.addProject(projectFile)
 def setUpClass(cls):
     ''' 'test' workspace cannot exist in the test catalog'''
     # setup auth configuration
     os.environ['QGIS_AUTH_DB_DIR_PATH'] = AUTH_TESTDATA
     cls.authm = QgsAuthManager.instance()
     msg = 'Failed to verify master password in auth db'
     assert cls.authm.setMasterPassword(AUTHDB_MASTERPWD, True), msg
     
     # connect and prepare pki catalog
     cls.cat = utils.getGeoServerCatalog(authcfgid=AUTHCFGID, authtype=AUTHTYPE)
     utils.cleanCatalog(cls.cat.catalog)
     cls.cat.catalog.create_workspace(WORKSPACE, "http://geoserver.com")
     cls.ws = cls.cat.catalog.get_workspace(WORKSPACE)
     assert cls.ws is not None
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data", "test.qgs")
     if os.path.normcase(projectFile) != os.path.normcase(QgsProject.instance().fileName()):
         iface.addProject(projectFile)
Example #12
0
 def setUpClass(cls):
     cls.explorer = GeoServerExplorer()
     cls.catWrapper = utils.getGeoServerCatalog()
     cls.cat = cls.catWrapper.catalog
     utils.populateCatalog(cls.cat)
     cls.catalogItem = GsCatalogItem(cls.cat, "catalog")
     cls.explorer.explorerTree.gsItem.addChild(cls.catalogItem)
     cls.catalogItem.populate()
     cls.tree = cls.explorer.tree
     # @TODO - make tests pass using importer
     cls.useRestApi = QSettings().setValue(
         "/GeoServer/Settings/GeoServer/UseRestApi", True)
     projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "data", "test.qgs")
     if os.path.normcase(projectFile) != os.path.normcase(
             QgsProject.instance().fileName()):
         iface.addProject(projectFile)
    def setUpClass(cls):
        ''' 'test' workspace cannot exist in the test catalog'''
        # setup auth configuration
        utils.initAuthManager()
        utils.populatePKITestCerts()

        # connect and prepare pki catalog
        cls.cat = utils.getGeoServerCatalog(authcfgid=utils.AUTHCFGID,
                                            authtype=utils.AUTHTYPE)
        utils.cleanCatalog(cls.cat.catalog)
        cls.cat.catalog.create_workspace(utils.WORKSPACE, "http://geoserver.com")
        cls.ws = cls.cat.catalog.get_workspace(utils.WORKSPACE)
        assert cls.ws is not None
        projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                   "data", "test.qgs")
        if (os.path.normcase(projectFile) !=
           os.path.normcase(QgsProject.instance().fileName())):
            iface.addProject(projectFile)
Example #14
0
    def setUpClass(cls):
        ''' 'test' workspace cannot exist in the test catalog'''
        # setup auth configuration
        utils.initAuthManager()
        utils.populatePKITestCerts()

        # connect and prepare pki catalog
        cls.cat = utils.getGeoServerCatalog(authcfgid=utils.AUTHCFGID,
                                            authtype=utils.AUTHTYPE)
        utils.cleanCatalog(cls.cat.catalog)
        cls.cat.catalog.create_workspace(utils.WORKSPACE,
                                         "http://geoserver.com")
        cls.ws = cls.cat.catalog.get_workspace(utils.WORKSPACE)
        assert cls.ws is not None
        projectFile = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                   "data", "test.qgs")
        if (os.path.normcase(projectFile) != os.path.normcase(
                QgsProject.instance().fileName())):
            iface.addProject(projectFile)