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)
 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)
Пример #3
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):
     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)
Пример #5
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)
Пример #6
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)