コード例 #1
0
def test_extents_missing_minx(base_order):
    base_order.update({
        'customization': {
            'output_format': 'envi'
        },
        'extents': {
            'maxx': '2.0'
        },
    })
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(base_order)
コード例 #2
0
def test_sinu_valid(sinu_proj_opts):
    assert {} != schema.load(sinu_proj_opts)
コード例 #3
0
def test_sinu_missing(sinu_proj_opts):
    sinu_proj_opts['projection']['sinu'].pop('central_meridian')
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(sinu_proj_opts)
コード例 #4
0
def test_extents_valid(extents_options):
    assert {} != schema.load(extents_options)
コード例 #5
0
def test_extents_missing(extents_options):
    extents_options['extents'].pop('maxx')
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(extents_options)
コード例 #6
0
def test_base_schema_missing(base_order):
    _ = base_order.pop('metadata')
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(base_order)
コード例 #7
0
def test_base_schema(base_order):
    assert base_order == schema.load(base_order)
コード例 #8
0
def test_not_valid_id(base_order):
    base_order.update({'input_name': 'not_valid'})
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(base_order)
コード例 #9
0
def test_ps_valid(ps_projection):
    assert {} != schema.load(ps_projection)
コード例 #10
0
def test_ps_missing(ps_projection):
    ps_projection['projection']['ps'].pop('latitude_true_scale')
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(ps_projection)
コード例 #11
0
def test_utm_valid(utm_proj_opts):
    assert {} != schema.load(utm_proj_opts)
コード例 #12
0
def test_utm_missing(utm_proj_opts):
    utm_proj_opts['projection']['utm'].pop('utm_zone')
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(utm_proj_opts)
コード例 #13
0
def test_aea_valid(aea_proj_opts):
    assert {} != schema.load(aea_proj_opts)
コード例 #14
0
def test_aea_missing(aea_proj_opts):
    aea_proj_opts['projection']['aea'].pop('origin_latitude')
    with pytest.raises(marshmallow.ValidationError):
        assert {} != schema.load(aea_proj_opts)