@@ -100,7 +100,7 @@ def _check_analyze_entities_result(self, entities):
100100
101101 def test_analyze_entities (self ):
102102 document = Config .CLIENT .document_from_text (self .TEXT_CONTENT )
103- entities = document .analyze_entities ()
103+ entities = document .analyze_entities (). entities
104104 self ._check_analyze_entities_result (entities )
105105
106106 def test_analyze_entities_from_blob (self ):
@@ -114,13 +114,13 @@ def test_analyze_entities_from_blob(self):
114114 # Create a document referencing that blob.
115115 gcs_url = 'gs://%s/%s' % (bucket_name , blob_name )
116116 document = Config .CLIENT .document_from_url (gcs_url )
117- entities = document .analyze_entities ()
117+ entities = document .analyze_entities (). entities
118118 self ._check_analyze_entities_result (entities )
119119
120120 def test_analyze_sentiment (self ):
121121 positive_msg = 'Jogging is fun'
122122 document = Config .CLIENT .document_from_text (positive_msg )
123- sentiment = document .analyze_sentiment ()
123+ sentiment = document .analyze_sentiment (). sentiment
124124 self .assertEqual (sentiment .score , 0.5 )
125125 self .assertTrue (0.0 < sentiment .magnitude < 1.5 )
126126
@@ -147,5 +147,5 @@ def _check_analyze_syntax_result(self, tokens):
147147 def test_analyze_syntax (self ):
148148 positive_msg = 'Jogging is fun'
149149 document = Config .CLIENT .document_from_text (positive_msg )
150- tokens = document .analyze_syntax ()
150+ tokens = document .analyze_syntax (). tokens
151151 self ._check_analyze_syntax_result (tokens )
0 commit comments