Skip to content

Commit c97e9bb

Browse files
basic alloys tests
1 parent 69bbcf1 commit c97e9bb

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

tests/materials/test_alloys.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import os
2+
3+
import pytest
4+
5+
from mp_api.client.routes.materials.alloys import AlloysRester
6+
7+
from core_function import client_search_testing
8+
9+
10+
@pytest.mark.skipif(os.getenv("MP_API_KEY") is None, reason="No API key found.")
11+
def test_alloys_search():
12+
client_search_testing(
13+
search_method=AlloysRester().search,
14+
excluded_params=[
15+
"num_chunks",
16+
"chunk_size",
17+
"all_fields",
18+
"fields",
19+
],
20+
alt_name_dict={
21+
"material_ids": "pair_id",
22+
"formulae": "alloy_pair",
23+
},
24+
custom_field_tests={
25+
"material_ids": ["mp-70", "mp-1014212"],
26+
"material_ids": "mp-1014212",
27+
"formulae": ["Rb", "Si"],
28+
},
29+
sub_doc_fields=[],
30+
)

0 commit comments

Comments
 (0)