Skip to content

Commit 38323dc

Browse files
author
Hannah
committed
adding entities/linked test
1 parent 20b5ca3 commit 38323dc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_rosette_api.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,21 @@ def test_the_entities_endpoint(api, json_response, doc_params):
307307
httpretty.disable()
308308
httpretty.reset()
309309

310+
# Test the entities/linked endpoint
311+
312+
313+
def test_the_entities_linked_endpoint(api, json_response, doc_params):
314+
httpretty.enable()
315+
httpretty.register_uri(httpretty.POST, "https://api.rosette.com/rest/v1/info",
316+
body=json_response, status=200, content_type="application/json")
317+
httpretty.register_uri(httpretty.POST, "https://api.rosette.com/rest/v1/entities/linked",
318+
body=json_response, status=200, content_type="application/json")
319+
320+
result = api.entities(doc_params, True)
321+
assert result["name"] == "Rosette API"
322+
httpretty.disable()
323+
httpretty.reset()
324+
310325
# Test the categories endpoint
311326

312327

0 commit comments

Comments
 (0)