1818
1919import numpy
2020import pytest
21-
22- # Use the updated SasView model API to load models
23- from sasmodels .sasview_model import _make_standard_model
21+ from sasmodels .sasview_model import find_model , load_standard_models
2422
2523import diffpy .srfit .pdf .characteristicfunctions as cf
2624
25+ load_standard_models ()
26+
2727# # Global variables to be assigned in setUp
2828# cf = None
2929# Fixme: remove this code if imports don't break on testing
@@ -36,7 +36,7 @@ def testSphere(sas_available):
3636 pytest .skip ("sas package not available" )
3737 radius = 25
3838 # Calculate sphere cf from SphereModel
39- SphereModel = _make_standard_model ("sphere" )
39+ SphereModel = find_model ("sphere" )
4040 model = SphereModel ()
4141 model .setParam ("radius" , radius )
4242 ff = cf .SASCF ("sphere" , model )
@@ -58,7 +58,7 @@ def testSpheroid(sas_available):
5858 prad = 20.9
5959 erad = 33.114
6060 # Calculate cf from EllipsoidModel
61- EllipsoidModel = _make_standard_model ("ellipsoid" )
61+ EllipsoidModel = find_model ("ellipsoid" )
6262 model = EllipsoidModel ()
6363 model .setParam ("radius_polar" , prad )
6464 model .setParam ("radius_equatorial" , erad )
@@ -81,7 +81,7 @@ def testShell(sas_available):
8181 radius = 19.2
8282 thickness = 7.8
8383 # Calculate cf from VesicleModel
84- VesicleModel = _make_standard_model ("vesicle" )
84+ VesicleModel = find_model ("vesicle" )
8585 model = VesicleModel ()
8686 model .setParam ("radius" , radius )
8787 model .setParam ("thickness" , thickness )
@@ -105,7 +105,7 @@ def testCylinder(sas_available):
105105 radius = 100
106106 length = 30
107107
108- CylinderModel = _make_standard_model ("cylinder" )
108+ CylinderModel = find_model ("cylinder" )
109109 model = CylinderModel ()
110110 model .setParam ("radius" , radius )
111111 model .setParam ("length" , length )
0 commit comments