Пример #1
0
    def setUp(self):
        self.dir = os.getcwd()
        self.tmp = mkdtemp(prefix='plats-')

        os.mkdir(self.tmp + '/working-dir')

        names = ('test-files/lake-man.zip', 'test-files/lake-man-GGNRA.zip',
                 'test-files/lake-man-San-Antonio.zip',
                 'test-files/lake-man-Santa-Clara.zip',
                 'test-files/lake-man-Portland.zip',
                 'test-files/lake-points-Ohio.zip',
                 'test-files/open-trails-GGNRA.zip',
                 'test-files/Boulder_County_Trails.zip',
                 'test-files/portland-segments.geojson',
                 'test-files/san-antonio-segments.geojson',
                 'test-files/sa-trailheads-test.zip',
                 'test-files/sa-trailheads.geojson')
        for name in names:
            copy(name, os.path.join(self.tmp, 'working-dir'))

        os.mkdir(self.tmp + '/datastore')
        app.config.update(DATASTORE='file://%s/datastore' % self.tmp)

        os.chdir(self.tmp + '/working-dir')

        self.app = app.test_client()
        self.config = app.config
Пример #2
0
    def setUp(self):
        self.dir = os.getcwd()
        self.tmp = mkdtemp(prefix='plats-')

        os.mkdir(self.tmp + '/working-dir')

        names = ('test-files/lake-man.zip',
                 'test-files/lake-man-GGNRA.zip',
                 'test-files/lake-man-San-Antonio.zip',
                 'test-files/lake-man-Santa-Clara.zip',
                 'test-files/lake-man-Portland.zip',
                 'test-files/lake-points-Ohio.zip',
                 'test-files/open-trails-GGNRA.zip',
                 'test-files/Boulder_County_Trails.zip',
                 'test-files/portland-segments.geojson',
                 'test-files/san-antonio-segments.geojson',
                 'test-files/sa-trailheads-test.zip',
                 'test-files/sa-trailheads.geojson')
        for name in names:
            copy(name, os.path.join(self.tmp, 'working-dir'))

        os.mkdir(self.tmp + '/datastore')
        app.config.update(DATASTORE='file://%s/datastore' % self.tmp)

        os.chdir(self.tmp + '/working-dir')

        self.app = app.test_client()
        self.config = app.config
Пример #3
0
    def setUp(self):
        self.dir = os.getcwd()
        self.tmp = mkdtemp(prefix="plats-")

        os.mkdir(self.tmp + "/working-dir")

        names = (
            "test-files/lake-man.zip",
            "test-files/lake-man-GGNRA.zip",
            "test-files/lake-man-San-Antonio.zip",
            "test-files/lake-man-Santa-Clara.zip",
            "test-files/lake-man-Portland.zip",
            "test-files/open-trails-GGNRA.zip",
            "test-files/portland-segments.geojson",
            "test-files/san-antonio-segments.geojson",
            "test-files/sa-trailheads-test.zip",
            "test-files/sa-trailheads.geojson",
        )
        for name in names:
            copy(name, os.path.join(self.tmp, "working-dir"))

        os.mkdir(self.tmp + "/datastore")
        app.config.update(DATASTORE="file://%s/datastore" % self.tmp)

        os.chdir(self.tmp + "/working-dir")

        self.app = app.test_client()
        self.config = app.config
Пример #4
0
 def setUp(self):
     self.app = app.test_client()
     self.tmp = mkdtemp(prefix='plats-')
     app.config['UPLOAD_FOLDER'] = self.tmp