|
6 | 6 | from shapely.geometry import shape
|
7 | 7 |
|
8 | 8 | from stac_pydantic import Collection, Item, ItemProperties
|
9 |
| -from stac_pydantic.extensions import _fetch_schema, validate_extensions |
| 9 | +from stac_pydantic.extensions import _fetch_and_cache_schema, validate_extensions |
10 | 10 | from stac_pydantic.links import Link, Links
|
11 | 11 | from stac_pydantic.shared import MimeTypes, StacCommonMetadata
|
12 | 12 |
|
@@ -120,16 +120,16 @@ def test_extension_validation_schema_cache() -> None:
|
120 | 120 | # Defines 3 extensions, but one is a non-existing URL
|
121 | 121 | test_item = request(EO_EXTENSION)
|
122 | 122 |
|
123 |
| - _fetch_schema.cache_clear() |
| 123 | + _fetch_and_cache_schema.cache_clear() |
124 | 124 |
|
125 | 125 | assert not validate_extensions(test_item)
|
126 |
| - assert _fetch_schema.cache_info().hits == 0 |
127 |
| - assert _fetch_schema.cache_info().misses == 3 |
| 126 | + assert _fetch_and_cache_schema.cache_info().hits == 0 |
| 127 | + assert _fetch_and_cache_schema.cache_info().misses == 3 |
128 | 128 |
|
129 | 129 | assert not validate_extensions(test_item)
|
130 |
| - assert _fetch_schema.cache_info().hits == 2 |
| 130 | + assert _fetch_and_cache_schema.cache_info().hits == 2 |
131 | 131 | # The non-existing URL will have failed, hence retried
|
132 |
| - assert _fetch_schema.cache_info().misses == 4 |
| 132 | + assert _fetch_and_cache_schema.cache_info().misses == 4 |
133 | 133 |
|
134 | 134 |
|
135 | 135 | @pytest.mark.parametrize(
|
|
0 commit comments