Skip to content

Commit 9df12ab

Browse files
syntax/dependencies with passing tests
1 parent 752e8ec commit 9df12ab

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

examples/syntax_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def run(key, altUrl='https://api.rosette.com/rest/v1/'):
15-
syntax_dependencies_data = "Sony Pictures is planning to shoot a good portion of the new /"Ghostbusters/" in Boston as well."
15+
syntax_dependencies_data = "Sony Pictures is planning to shoot a good portion of the new \"Ghostbusters\" in Boston as well."
1616
params = DocumentParameters()
1717
params["content"] = syntax_dependencies_dataa
1818
params["genre"] = "social-media"

rosette/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,5 +847,5 @@ def syntax_dependencies(self, parameters):
847847
Create an L{EndpointCaller} to identify the syntactic dependencies in the texts
848848
to which it is applied and call it.
849849
@type parameters: L{DocumentParameters} or L{str}
850-
@return: A python dictionary containing the results of syntactic dependencies identification
850+
@return: A python dictionary containing the results of syntactic dependencies identification"""
851851
return EndpointCaller(self, "syntax/dependencies").call(parameters)

tests/test_rosette_api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,12 +591,13 @@ def test_the_text_embedded_endpoint(api, json_response, doc_params):
591591
httpretty.disable()
592592
httpretty.reset()
593593

594+
594595
def test_the_syntax_dependencies_endpoint(api, json_response, doc_params):
595-
httprettry.enable()
596-
httpretty.register_url(httpretty.POST, "https://api.rosette.com/rest/v1/syntax/dependencies",
596+
httpretty.enable()
597+
httpretty.register_uri(httpretty.POST, "https://api.rosette.com/rest/v1/syntax/dependencies",
597598
body=json_response, status=200, content_type="application/json")
598599

599600
result = api.syntax_dependencies(doc_params)
600601
assert result["name"] == "Rosette API"
601602
httpretty.disable()
602-
httprettty.reset()
603+
httpretty.reset()

0 commit comments

Comments
 (0)