1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717
|
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sat, 21 Feb 2026 21:53:09 +0000
Subject: No network
Forwarded: not-needed
---
pyproject.toml | 7 ++++++-
tests/test_assets.py | 6 ++++++
tests/test_config.py | 4 ++++
tests/test_core.py | 14 ++++++++++++++
tests/test_custom.py | 7 +++++++
tests/test_default.py | 11 +++++++++++
tests/test_extensions.py | 12 ++++++++++++
tests/test_header.py | 2 ++
tests/test_links.py | 4 ++++
tests/test_pydantic.py | 3 +++
tests/test_recursion.py | 14 ++++++++++++++
tests/test_sys_exit.py | 2 ++
tests/test_validate_collections.py | 3 +++
tests/test_validate_dict.py | 4 ++++
tests/test_validate_item_collection.py | 7 +++++++
15 files changed, 99 insertions(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index fcc1642..4140ae3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -59,4 +59,9 @@ packages = ["stac_validator"]
stac-validator = "stac_validator.stac_validator:main"
[tool.setuptools.package-data]
-stac_validator = ["*.yaml"]
\ No newline at end of file
+stac_validator = ["*.yaml"]
+
+[tool.pytest.ini_options]
+markers = [
+ "network: test requires network access",
+]
diff --git a/tests/test_assets.py b/tests/test_assets.py
index 7734952..8ebf2c5 100644
--- a/tests/test_assets.py
+++ b/tests/test_assets.py
@@ -5,9 +5,12 @@ Description: Test --assets option
import json
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_assets_v090():
stac_file = "tests/test_data/v090/items/CBERS_4_bad_links.json"
stac = stac_validator.StacValidate(stac_file, assets=True)
@@ -50,6 +53,7 @@ def test_assets_v090():
]
+@pytest.mark.network
def test_assets_v100():
stac_file = "tests/test_data/v100/simple-item.json"
stac = stac_validator.StacValidate(stac_file, assets=True)
@@ -80,6 +84,7 @@ def test_assets_v100():
]
+@pytest.mark.network
def test_assets_v100_no_links():
stac_file = "tests/test_data/v100/simple-item.json"
stac = stac_validator.StacValidate(stac_file, assets=True, assets_open_urls=False)
@@ -107,6 +112,7 @@ def test_assets_v100_no_links():
]
+@pytest.mark.network
def test_assets_on_collection_without_assets_ok():
stac_file = "tests/test_data/v100/collection.json"
stac = stac_validator.StacValidate(stac_file, assets=True)
diff --git a/tests/test_config.py b/tests/test_config.py
index 4106ac1..3778883 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -1,6 +1,9 @@
+import pytest
+
from stac_validator.validate import StacValidate
+@pytest.mark.network
def test_validator_with_test_config():
validator = StacValidate(
stac_file="tests/test_data/v100/core-item.json",
@@ -12,6 +15,7 @@ def test_validator_with_test_config():
assert validator.message[-1]["schema"] == ["local_schemas/v1.0.0/item.json"]
+@pytest.mark.network
def test_validator_with_test_config_eo():
validator = StacValidate(
stac_file="tests/test_data/v100/extended-item.json",
diff --git a/tests/test_core.py b/tests/test_core.py
index 0e116b2..30db2af 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -3,9 +3,12 @@ Description: Test the validator for core functionality without validating extens
"""
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_core_item_local_v080():
stac_file = "tests/test_data/v080/items/sample-full.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -22,6 +25,7 @@ def test_core_item_local_v080():
]
+@pytest.mark.network
def test_core_collection_remote_v090():
stac_file = "https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-files/examples/0.9.0/collection-spec/examples/landsat-collection.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -38,6 +42,7 @@ def test_core_collection_remote_v090():
]
+@pytest.mark.network
def test_core_item_local_v090():
stac_file = "tests/test_data/v090/items/good_item_v090.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -54,6 +59,7 @@ def test_core_item_local_v090():
]
+@pytest.mark.network
def test_core_item_local_extensions_v090():
stac_file = "tests/test_data/v090/items/CBERS_4.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -70,6 +76,7 @@ def test_core_item_local_extensions_v090():
]
+@pytest.mark.network
def test_core_bad_item_local_v090():
stac_file = "tests/test_data/bad_data/bad_item_v090.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -90,6 +97,7 @@ def test_core_bad_item_local_v090():
]
+@pytest.mark.network
def test_core_v1beta1():
stac_file = "tests/test_data/1beta1/sentinel2.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -106,6 +114,7 @@ def test_core_v1beta1():
]
+@pytest.mark.network
def test_core_item_local_v1beta2():
stac_file = "tests/test_data/1beta2/stac_item.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -124,6 +133,7 @@ def test_core_item_local_v1beta2():
]
+@pytest.mark.network
def test_core_item_local_v1rc1():
stac_file = "tests/test_data/1rc1/collectionless-item.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -142,6 +152,7 @@ def test_core_item_local_v1rc1():
]
+@pytest.mark.network
def test_core_collection_local_v1rc1():
stac_file = "tests/test_data/1rc1/collection.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -160,6 +171,7 @@ def test_core_collection_local_v1rc1():
]
+@pytest.mark.network
def test_core_item_local_v100():
stac_file = "tests/test_data/v100/extended-item.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -178,6 +190,7 @@ def test_core_item_local_v100():
]
+@pytest.mark.network
def test_core_collection_local_v110():
stac_file = "tests/test_data/v110/collection.json"
stac = stac_validator.StacValidate(stac_file, core=True)
@@ -196,6 +209,7 @@ def test_core_collection_local_v110():
]
+@pytest.mark.network
def test_core_item_local_v110():
stac_file = "tests/test_data/v110/simple-item.json"
stac = stac_validator.StacValidate(stac_file, core=True)
diff --git a/tests/test_custom.py b/tests/test_custom.py
index de10e1e..1b0f169 100644
--- a/tests/test_custom.py
+++ b/tests/test_custom.py
@@ -3,9 +3,12 @@ Description: Test the custom option for custom schemas
"""
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_custom_item_remote_schema_v080():
schema = "https://cdn.staclint.com/v0.8.0/item.json"
stac_file = "tests/test_data/v080/items/digitalglobe-sample.json"
@@ -27,6 +30,7 @@ def test_custom_item_remote_schema_v080():
]
+@pytest.mark.network
def test_custom_item_remote_schema_v090():
schema = "https://cdn.staclint.com/v0.9.0/catalog.json"
stac_file = "https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-files/examples/0.9.0/collection-spec/examples/landsat-collection.json"
@@ -44,6 +48,7 @@ def test_custom_item_remote_schema_v090():
]
+@pytest.mark.network
def test_custom_item_local_schema_v090():
schema = "tests/test_data/schema/v0.9.0/catalog.json"
@@ -62,6 +67,7 @@ def test_custom_item_local_schema_v090():
]
+@pytest.mark.network
def test_custom_bad_item_remote_schema_v090():
schema = "https://cdn.staclint.com/v0.9.0/item.json"
stac_file = "tests/test_data/bad_data/bad_item_v090.json"
@@ -83,6 +89,7 @@ def test_custom_bad_item_remote_schema_v090():
]
+@pytest.mark.network
def test_custom_item_remote_schema_v1rc2():
schema = "https://schemas.stacspec.org/v1.0.0-rc.2/item-spec/json-schema/item.json"
diff --git a/tests/test_default.py b/tests/test_default.py
index d1c496e..42e471f 100644
--- a/tests/test_default.py
+++ b/tests/test_default.py
@@ -3,9 +3,12 @@ Description: Test the default which validates core and extensions
"""
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_default_v070():
stac_file = "https://radarstac.s3.amazonaws.com/stac/catalog.json"
stac = stac_validator.StacValidate(stac_file)
@@ -22,6 +25,7 @@ def test_default_v070():
]
+@pytest.mark.network
def test_default_item_local_v110():
stac_file = "tests/test_data/v110/extended-item.json"
stac = stac_validator.StacValidate(stac_file)
@@ -45,6 +49,7 @@ def test_default_item_local_v110():
]
+@pytest.mark.network
def test_default_v090():
stac = stac_validator.StacValidate("tests/test_data/v090/items/good_item_v090.json")
stac.run()
@@ -65,6 +70,7 @@ def test_default_v090():
]
+@pytest.mark.network
def test_default_v1beta1():
stac_file = "tests/test_data/1beta1/sentinel2.json"
stac = stac_validator.StacValidate(stac_file)
@@ -81,6 +87,7 @@ def test_default_v1beta1():
]
+@pytest.mark.network
def test_default_proj_v1b2():
stac_file = "https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l1c/items/S2A_51SXT_20210415_0_L1C"
stac = stac_validator.StacValidate(stac_file)
@@ -102,6 +109,7 @@ def test_default_proj_v1b2():
]
+@pytest.mark.network
def test_default_simple_v1rc2():
stac_file = "tests/test_data/1rc2/simple-item.json"
stac = stac_validator.StacValidate(stac_file)
@@ -120,6 +128,7 @@ def test_default_simple_v1rc2():
]
+@pytest.mark.network
def test_default_extended_v1rc2():
stac_file = "tests/test_data/1rc2/extended-item.json"
stac = stac_validator.StacValidate(stac_file)
@@ -143,6 +152,7 @@ def test_default_extended_v1rc2():
]
+@pytest.mark.network
def test_default_catalog_v1rc2():
stac_file = "tests/test_data/1rc2/catalog.json"
stac = stac_validator.StacValidate(stac_file)
@@ -161,6 +171,7 @@ def test_default_catalog_v1rc2():
]
+@pytest.mark.network
def test_default_collection_validates_extensions():
stac_file = "tests/test_data/v100/collection.json"
stac = stac_validator.StacValidate(stac_file)
diff --git a/tests/test_extensions.py b/tests/test_extensions.py
index 2b03907..5612c05 100644
--- a/tests/test_extensions.py
+++ b/tests/test_extensions.py
@@ -25,6 +25,7 @@ def test_item_local_v080():
]
+@pytest.mark.network
def test_v090():
stac_file = "tests/test_data/v090/extensions/eo/examples/example-landsat8.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -44,6 +45,7 @@ def test_v090():
]
+@pytest.mark.network
def test_v1beta1():
stac_file = "tests/test_data/1beta1/sentinel2.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -60,6 +62,7 @@ def test_v1beta1():
]
+@pytest.mark.network
def test_no_extensions_v1beta2():
stac_file = "tests/test_data/1beta2/stac_item.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -78,6 +81,7 @@ def test_no_extensions_v1beta2():
]
+@pytest.mark.network
def test_v1beta2():
stac_file = "tests/test_data/1beta2/CBERS_4.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -97,6 +101,7 @@ def test_v1beta2():
]
+@pytest.mark.network
def test_remote_v1rc3():
stac_file = "https://raw.githubusercontent.com/radiantearth/stac-spec/v1.0.0-rc.3/examples/extended-item.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -119,6 +124,7 @@ def test_remote_v1rc3():
]
+@pytest.mark.network
def test_remote_v1rc4():
stac_file = "https://raw.githubusercontent.com/radiantearth/stac-spec/v1.0.0-rc.4/examples/extended-item.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -141,6 +147,7 @@ def test_remote_v1rc4():
]
+@pytest.mark.network
def test_local_v1rc2():
stac_file = (
"tests/test_data/1rc2/extensions-collection/./proj-example/proj-example.json"
@@ -161,6 +168,7 @@ def test_local_v1rc2():
]
+@pytest.mark.network
def test_catalog_v1rc2():
stac_file = "tests/test_data/1rc2/catalog.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -179,6 +187,7 @@ def test_catalog_v1rc2():
]
+@pytest.mark.network
def test_item_v100():
stac_file = "tests/test_data/v100/extended-item.json"
stac = stac_validator.StacValidate(stac_file, extensions=True)
@@ -217,6 +226,7 @@ def test_item_v100_local_schema():
]
+@pytest.mark.network
def test_item_v100_override_schema_with_schema_map():
stac_file = "tests/test_data/v100/extended-item.json"
stac = stac_validator.StacValidate(
@@ -245,6 +255,7 @@ def test_item_v100_override_schema_with_schema_map():
]
+@pytest.mark.network
def test_item_v100_local_schema_unreachable_url_schema_map_override():
"""
This tests that references in schemas are also replaced by the schema_map
@@ -272,6 +283,7 @@ def test_item_v100_local_schema_unreachable_url_schema_map_override():
]
+@pytest.mark.network
def test_verbose_mode_output():
"""Test that verbose mode provides detailed error information in the expected format."""
stac_file = "tests/test_data/v100/bad-item.json"
diff --git a/tests/test_header.py b/tests/test_header.py
index 6203bd0..872048b 100644
--- a/tests/test_header.py
+++ b/tests/test_header.py
@@ -5,11 +5,13 @@ Description: Test --header option
import json
+import pytest
import requests_mock
from stac_validator import stac_validator
+@pytest.mark.network
def test_header():
stac_file = "tests/test_data/v110/simple-item.json"
url = "https://localhost/" + stac_file
diff --git a/tests/test_links.py b/tests/test_links.py
index 913bd13..de88ed0 100644
--- a/tests/test_links.py
+++ b/tests/test_links.py
@@ -3,9 +3,12 @@ Description: Test --links option
"""
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_poorly_formatted_v090():
stac_file = "tests/test_data/v090/items/CBERS_4_bad_links.json"
stac = stac_validator.StacValidate(stac_file, links=True)
@@ -43,6 +46,7 @@ def test_poorly_formatted_v090():
]
+@pytest.mark.network
def test_item_v100():
stac_file = "tests/test_data/v100/extended-item.json"
stac = stac_validator.StacValidate(stac_file, links=True)
diff --git a/tests/test_pydantic.py b/tests/test_pydantic.py
index fc573e1..4a5bb3c 100644
--- a/tests/test_pydantic.py
+++ b/tests/test_pydantic.py
@@ -3,6 +3,8 @@ Description: Test the validator for Pydantic model validation
"""
+import pytest
+
from stac_validator import stac_validator
@@ -19,6 +21,7 @@ def test_pydantic_item_local_v110():
assert stac.message[0]["model_validation"] == "passed"
+@pytest.mark.network
def test_pydantic_collection_local_v110():
stac_file = "tests/test_data/v110/collection.json"
stac = stac_validator.StacValidate(stac_file, pydantic=True)
diff --git a/tests/test_recursion.py b/tests/test_recursion.py
index 434f39a..0501aa8 100644
--- a/tests/test_recursion.py
+++ b/tests/test_recursion.py
@@ -3,9 +3,12 @@ Description: Test validation for recursion
"""
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_recursive_lvl_4_local_v100():
stac_file = "tests/test_data/local_cat/open-science-catalog-testing/catalog.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, max_depth=4)
@@ -63,6 +66,7 @@ def test_recursive_lvl_4_local_v100():
]
+@pytest.mark.network
def test_recursive_local_v090():
stac_file = "tests/test_data/v090/catalog.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, max_depth=1)
@@ -102,6 +106,7 @@ def test_recursive_local_v090():
]
+@pytest.mark.network
def test_recursive_v1beta1():
stac_file = "tests/test_data/1beta1/sentinel2.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, max_depth=0)
@@ -119,6 +124,7 @@ def test_recursive_v1beta1():
]
+@pytest.mark.network
def test_recursive_v1beta2():
stac_file = "https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-files/examples/1.0.0-beta.2/collection-spec/examples/sentinel2.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, max_depth=0)
@@ -138,6 +144,7 @@ def test_recursive_v1beta2():
]
+@pytest.mark.network
def test_recursion_collection_local_v1rc1():
stac_file = "tests/test_data/1rc1/collection.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, max_depth=1)
@@ -194,6 +201,7 @@ def test_recursion_collection_local_v1rc1():
]
+@pytest.mark.network
def test_recursion_collection_local_v1rc2():
stac_file = "tests/test_data/1rc2/collection.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, max_depth=1)
@@ -251,6 +259,7 @@ def test_recursion_collection_local_v1rc2():
]
+@pytest.mark.network
def test_recursion_collection_local_2_v1rc2():
stac_file = "tests/test_data/1rc2/extensions-collection/collection.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, max_depth=1)
@@ -282,6 +291,7 @@ def test_recursion_collection_local_2_v1rc2():
]
+@pytest.mark.network
def test_recursion_without_max_depth():
stac_file = "tests/test_data/v100/catalog.json"
stac = stac_validator.StacValidate(stac_file, recursive=True)
@@ -289,6 +299,7 @@ def test_recursion_without_max_depth():
assert len(stac.message) == 6
+@pytest.mark.network
def test_recursion_with_bad_item():
stac_file = "tests/test_data/v100/catalog-with-bad-item.json"
stac = stac_validator.StacValidate(stac_file, recursive=True)
@@ -311,6 +322,7 @@ def test_recursion_with_bad_item():
]
+@pytest.mark.network
def test_recursion_with_bad_item_trace_recursion():
stac_file = "tests/test_data/v100/catalog-with-bad-item.json"
stac = stac_validator.StacValidate(stac_file, recursive=True, trace_recursion=True)
@@ -344,6 +356,7 @@ def test_recursion_with_bad_item_trace_recursion():
]
+@pytest.mark.network
def test_recursion_with_bad_child_collection():
# It is important here that there is a second good child in the collection
# since a previous bug did not correctly set the valid variable if the last
@@ -372,6 +385,7 @@ def test_recursion_with_bad_child_collection():
]
+@pytest.mark.network
def test_recursion_with_missing_collection_link():
stac_file = "tests/test_data/v100/item-without-collection-link.json"
stac = stac_validator.StacValidate(stac_file, recursive=True)
diff --git a/tests/test_sys_exit.py b/tests/test_sys_exit.py
index be70f94..c38d22c 100644
--- a/tests/test_sys_exit.py
+++ b/tests/test_sys_exit.py
@@ -3,6 +3,7 @@ import subprocess
import pytest
+@pytest.mark.network
def test_correct_sys_exit_error_python():
with pytest.raises(subprocess.CalledProcessError):
subprocess.run(
@@ -25,6 +26,7 @@ def test_correct_sys_exit_error_recursion():
)
+@pytest.mark.network
def test_false_sys_exit_error_python():
subprocess.run(
["stac-validator", "tests/test_data/v090/items/good_item_v090.json"],
diff --git a/tests/test_validate_collections.py b/tests/test_validate_collections.py
index 20b7f75..dfb3aad 100644
--- a/tests/test_validate_collections.py
+++ b/tests/test_validate_collections.py
@@ -3,9 +3,12 @@ Description: Test stac-validator on --collections (/collections validation).
"""
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_validate_collections_remote():
stac_file = "https://earth-search.aws.element84.com/v0/collections"
stac = stac_validator.StacValidate(stac_file, collections=True)
diff --git a/tests/test_validate_dict.py b/tests/test_validate_dict.py
index 7a6c9a5..5820fdd 100644
--- a/tests/test_validate_dict.py
+++ b/tests/test_validate_dict.py
@@ -5,9 +5,12 @@ Description: Test the validator
import json
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_validate_dict_catalog_v1rc2():
stac_file = {
"id": "examples",
@@ -52,6 +55,7 @@ def test_validate_dict_catalog_v1rc2():
]
+@pytest.mark.network
def test_correct_validate_dict_return_method():
stac = stac_validator.StacValidate()
with open("tests/test_data/1rc2/extensions-collection/collection.json", "r") as f:
diff --git a/tests/test_validate_item_collection.py b/tests/test_validate_item_collection.py
index 0d7e8d5..977a97e 100644
--- a/tests/test_validate_item_collection.py
+++ b/tests/test_validate_item_collection.py
@@ -3,9 +3,12 @@ Description: Test stac-validator on item-collection validation.
"""
+import pytest
+
from stac_validator import stac_validator
+@pytest.mark.network
def test_validate_item_collection_in_memory():
item_collection = {
"type": "FeatureCollection",
@@ -251,6 +254,7 @@ def test_validate_item_collection_in_memory():
]
+@pytest.mark.network
def test_validate_item_collection_remote():
stac_file = (
"https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a/items"
@@ -325,6 +329,7 @@ def test_validate_item_collection_remote():
assert len(seen_ids) == 10, f"Expected 10 unique item IDs, got {len(seen_ids)}"
+@pytest.mark.network
def test_validate_item_collection_remote_pages():
stac_file = "https://stac.geobon.org/collections/chelsa-clim/items"
stac = stac_validator.StacValidate(stac_file, item_collection=True, pages=2)
@@ -543,6 +548,7 @@ def test_validate_item_collection_remote_pages():
]
+@pytest.mark.network
def test_validate_item_collection_remote_pages_1_v110():
stac_file = "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items"
stac = stac_validator.StacValidate(stac_file, item_collection=True, pages=1)
@@ -584,6 +590,7 @@ def test_validate_item_collection_remote_pages_1_v110():
assert len(stac.message) == 10
+@pytest.mark.network
def test_validate_item_collection_remote_pages_3_v110():
stac_file = "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-3-olci-2-wfr-nrt/items"
stac = stac_validator.StacValidate(stac_file, item_collection=True, pages=3)
|