File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,21 @@ def test_phonon_get_methods(use_document_model):
4242 for func_name , schema in {
4343 "bandstructure" : PhononBS ,
4444 "dos" : PhononDOS ,
45- # "forceconstants": list
45+ "forceconstants" : list ,
4646 }.items ():
47+ args = tuple () if func_name == "forceconstants" else ("dfpt" ,)
4748 search_method = getattr (
4849 rester ,
4950 f"get_{ func_name } _from_material_id" ,
5051 )
51- assert isinstance (
52- search_method ("mp-149" , "dfpt" ), schema if use_document_model else dict
53- )
52+
53+ if func_name != "forceconstants" :
54+ assert isinstance (
55+ search_method ("mp-149" , * args ), schema if use_document_model else dict
56+ )
5457
5558 with pytest .raises (MPRestError , match = "No object found" ):
56- _ = search_method ("mp-0" , "dfpt" )
59+ _ = search_method ("mp-0" , * args )
5760
5861
5962@pytest .mark .skipif (os .getenv ("MP_API_KEY" ) is None , reason = "No API key found." )
You can’t perform that action at this time.
0 commit comments