Skip to content

Commit bf29459

Browse files
committed
Skip partial_data tests for elastic search for which it has not been implemented yet.
1 parent e04387f commit bf29459

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tests/server/routers/test_partial_data.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
import pytest
2+
13
from optimade.models import PartialDataResponse
4+
from optimade.server.config import CONFIG
25

36
from ..utils import NoJsonEndpointTests
47

58

9+
@pytest.mark.skipif(
10+
CONFIG.database_backend.value not in ("mongomock", "mongodb"),
11+
reason="At the moment partial data is only supported for the MongoDB backend",
12+
)
613
class TestPartialDataEndpoint(NoJsonEndpointTests):
714
"""Tests for /partial_data/<entry_id>"""
815

@@ -12,6 +19,10 @@ class TestPartialDataEndpoint(NoJsonEndpointTests):
1219
response_cls = PartialDataResponse
1320

1421

22+
@pytest.mark.skipif(
23+
CONFIG.database_backend.value not in ("mongomock", "mongodb"),
24+
reason="At the moment partial data is only supported for the MongoDB backend",
25+
)
1526
def test_property_ranges_link(get_good_response, client):
1627
test_id = "mpf_551"
1728
params = "response_fields=cartesian_site_positions&property_ranges=dim_sites:2:74:1,dim_cartesian_dimensions:1:3:1&response_format=json"
@@ -21,9 +32,12 @@ def test_property_ranges_link(get_good_response, client):
2132
) # todo expand test to check content better.
2233

2334

35+
@pytest.mark.skipif(
36+
CONFIG.database_backend.value not in ("mongomock", "mongodb"),
37+
reason="At the moment partial data is only supported for the MongoDB backend",
38+
)
2439
def test_wrong_id_partial_data(check_error_response, client):
25-
"""If a non-supported versioned base URL is passed, `553 Version Not Supported` should be returned
26-
40+
"""
2741
A specific JSON response should also occur.
2842
"""
2943
test_id = "mpf_486"

0 commit comments

Comments
 (0)