1+ import pytest
2+
13from optimade .models import PartialDataResponse
4+ from optimade .server .config import CONFIG
25
36from ..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+ )
613class 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+ )
1526def 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+ )
2439def 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