File: test_cli.py

package info (click to toggle)
stac-pydantic 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 664 kB
  • sloc: python: 1,787; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from stac_pydantic.scripts.cli import app
import pytest


@pytest.mark.network
def test_valid_stac_item(cli_runner):
    result = cli_runner.invoke(
        app,
        [
            "validate-item",
            "https://raw.githubusercontent.com/radiantearth/stac-spec/v1.0.0/examples/extended-item.json",
        ],
    )

    if result.exception:
        raise result.exception

    assert result.exit_code == 0