コード例 #1
0
 def setUpClass(cls):
     ''' 'test' workspace cannot exist in the test catalog'''
     cls.cat = createGeoServerCatalog()
     utils.cleanCatalog(cls.cat.catalog)
     cls.cat.catalog.create_workspace(WORKSPACE, "http://boundlessgeo.com")
     cls.ws = cls.cat.catalog.get_workspace(WORKSPACE)
     assert cls.ws is not None
コード例 #2
0
ファイル: utils.py プロジェクト: GeoCat/qgis-suite-plugin
def getGeoServerCatalog():
    conf = dict(
        URL = 'http://boundless-test:8080/geoserver/rest',
        USER = '******',
        PASSWORD = '******'
    )
    conf.update([ (k,os.getenv('GS%s' % k)) for k in conf if 'GS%s' % k in os.environ])
    cat = createGeoServerCatalog(conf['URL'], conf['USER'], conf['PASSWORD'])
    try:
        cat.catalog.gsversion()
    except Exception, ex:
        msg = 'cannot reach geoserver using provided credentials %s, msg is %s'
        raise AssertionError(msg % (conf,ex))
コード例 #3
0
 def setUp(self):        
     self.cat = createGeoServerCatalog()