@@ -19,14 +19,15 @@ def setUp(self):
1919 'X-Watson-Test' :
2020 '1'
2121 })
22+ self .classifier_id = 'CarsvsTrucks_931077904'
2223
2324 def test_classify (self ):
2425 car_path = join (dirname (__file__ ), '../../resources/cars.zip' )
2526 with open (car_path , 'rb' ) as images_file :
2627 parameters = json .dumps ({
2728 'threshold' :
2829 0.1 ,
29- 'classifier_ids' : ['CarsvsTrucks_931077904' , 'default' ]
30+ 'classifier_ids' : [self . classifier_id , 'default' ]
3031 })
3132 car_results = self .visual_recognition .classify (
3233 images_file = images_file , parameters = parameters )
@@ -46,7 +47,8 @@ def test_custom_classifier(self):
4647 classifier = self .visual_recognition .create_classifier (
4748 'Cars vs Trucks' ,
4849 cars_positive_examples = cars ,
49- negative_examples = trucks )
50+ negative_examples = trucks ,
51+ )
5052
5153 assert classifier is not None
5254
@@ -58,3 +60,7 @@ def test_custom_classifier(self):
5860 assert classifiers is not None
5961
6062 output = self .visual_recognition .delete_classifier (classifier_id )
63+
64+ def test_core_ml_model (self ):
65+ core_ml_model = self .visual_recognition .get_core_ml_model (self .classifier_id )
66+ assert core_ml_model .ok
0 commit comments