Exemple #1
0
 def setUp(self):
     cfg = ConfigParser.SafeConfigParser()
     cfg.read((os.path.join(TEST_DIR, "tests.cfg")))
     cfg.set("FileMan", "testdir", TEST_DIR)
     self.le = LayEd(cfg)
     self.gsr = GsRest(cfg)
     self.config = cfg
     self.workdir = os.path.abspath(
         os.path.join(TEST_DIR, "workdir", "data"))
Exemple #2
0
    def test_cloneStyle(self):
        
        self.le.cloneStyle(fromStyleUrl="http://erra.ccss.cz/geoserver/rest/styles/polygon.json", toWorkspace="pprd", toStyle="MyNewPoly")

        gsr = GsRest(self.config)
        (head, cont) = gsr.getStyleSld(workspace="pprd", styleName="MyNewPoly")
        print " *** TEST *** clone style 1 ***"
        print head
        print cont

        self.le.cloneStyle(fromWorkspace="pprd", fromStyle="MyNewPoly", toWorkspace=None, toStyle="YourNewPoly")

        (head, cont) = gsr.getStyleSld(workspace=None, styleName="YourNewPoly")
        print " *** TEST *** clone style 2 ***"
        print head
        print cont