Exemple #1
0
def setup_module():
    if not mock_s3 or not boto3:
        raise SkipTest("boto3 and moto required for S3 tests")

    global _mock
    _mock = mock_s3()
    _mock.start()

    boto3.client("s3").create_bucket(Bucket="default_bucket")
    boto3.client("s3").create_bucket(Bucket="tiles")
    boto3.client("s3").create_bucket(Bucket="reversetiles")

    prepare_env(test_config, 'cache_s3.yaml')
    create_app(test_config)
Exemple #2
0
def setup_module():
    if not mock_s3 or not boto3:
        raise SkipTest("boto3 and moto required for S3 tests")

    global _mock
    _mock = mock_s3()
    _mock.start()

    boto3.client("s3").create_bucket(Bucket="default_bucket")
    boto3.client("s3").create_bucket(Bucket="tiles")
    boto3.client("s3").create_bucket(Bucket="reversetiles")

    prepare_env(test_config, 'cache_s3.yaml')
    create_app(test_config)
Exemple #3
0
def setup_module():
    if platform.system() == 'Windows':
        raise SkipTest('CGI test only works on Unix (for now)')

    prepare_env(test_config, 'mapserver.yaml')

    shutil.copy(os.path.join(test_config['fixture_dir'], 'cgi.py'),
        test_config['base_dir'])

    os.chmod(os.path.join(test_config['base_dir'], 'cgi.py'),
        stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR)

    os.mkdir(os.path.join(test_config['base_dir'], 'tmp'))

    create_app(test_config)
def setup_module():
    prepare_env(test_config, 'cache_mbtiles.yaml')

    shutil.copy(os.path.join(test_config['fixture_dir'], 'cache.mbtiles'),
        test_config['base_dir'])
    create_app(test_config)
Exemple #5
0
def setup_module():
    prepare_env(test_config, 'cache_geopackage.yaml')

    shutil.copy(os.path.join(test_config['fixture_dir'], 'cache.gpkg'),
        test_config['base_dir'])
    create_app(test_config)
def setup_module():
    prepare_env(test_config, 'cache_mbtiles.yaml')

    shutil.copy(os.path.join(test_config['fixture_dir'], 'cache.mbtiles'),
                test_config['base_dir'])
    create_app(test_config)