@@ -166,16 +166,20 @@ def test_retry500():
166166# Test that getting the info about the API is being called correctly
167167@httpretty .activate
168168def test_responseHeaders ():
169+ httpretty .register_uri (httpretty .POST , "https://api.rosette.com/rest/v1/entities" ,
170+ status = 200 ,
171+ body = get_file_content (response_file_dir + "eng-doc-entities.json" ),
172+ content_type = "application/json" )
173+ # need to mock /info call too because the api will call it implicitly
169174 with open (response_file_dir + "info.json" , "r" ) as info_file :
170175 body = info_file .read ()
171176 httpretty .register_uri (httpretty .GET , "https://api.rosette.com/rest/v1/info" ,
172177 body = body , status = 200 , content_type = "application/json" )
173-
174- test = RosetteTest (None )
175- result = test .api .info ()
176- assert result ["buildNumber" ] == "6bafb29d"
177- assert result ["name" ] == "Rosette API"
178- assert result ["versionChecked" ] is True
178+ httpretty .register_uri (httpretty .POST , "https://api.rosette.com/rest/v1/info" ,
179+ body = body , status = 200 , content_type = "application/json" )
180+ test = RosetteTest ("eng-doc-entities" )
181+ result = test .api .entities (test .params )
182+ assert ("responseHeaders" in result ) == True
179183
180184
181185@httpretty .activate
0 commit comments