Exemplo n.º 1
0
def test_handle_cli_edit_bbox():
    argv = [
        PG_BLOB1, '--edit', 'load.arguments.spatial_extent={"west":2,"east":6}'
    ]
    pg, args = handle_cli(argv)
    assert pg == {
        "load": {
            "process_id": "load_collection",
            "arguments": {
                "id": "FOOBAR",
                "spatial_extent": {
                    "west": 2,
                    "east": 6
                }
            }
        }
    }
Exemplo n.º 2
0
def test_handle_cli_wrapper():
    argv = ['{"process_graph":' + PG_BLOB1 + '}']
    pg, args = handle_cli(argv)
    assert pg == {
        "load": {
            "process_id": "load_collection",
            "arguments": {
                "id": "FOOBAR",
                "spatial_extent": {
                    "west": 3,
                    "south": 51,
                    "east": 4,
                    "north": 52
                }
            }
        }
    }
Exemplo n.º 3
0
def test_handle_cli_edit_west():
    argv = ['--edit', "load.arguments.spatial_extent.west=2", PG_BLOB1]
    pg, args = handle_cli(argv)
    assert pg == {
        "load": {
            "process_id": "load_collection",
            "arguments": {
                "id": "FOOBAR",
                "spatial_extent": {
                    "west": 2,
                    "south": 51,
                    "east": 4,
                    "north": 52
                }
            }
        }
    }
Exemplo n.º 4
0
def test_handle_cli_edit_inject():
    argv = ['--edit', 'load.arguments.bands=["VH", "VV"]', PG_BLOB1]
    pg, args = handle_cli(argv)
    assert pg == {
        "load": {
            "process_id": "load_collection",
            "arguments": {
                "id": "FOOBAR",
                "spatial_extent": {
                    "west": 3,
                    "south": 51,
                    "east": 4,
                    "north": 52
                },
                "bands": ["VH", "VV"]
            }
        }
    }