Skip to content

Commit

Permalink
Update system tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sneeringer committed Feb 23, 2017
1 parent 0b3ce25 commit c0448da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system_tests/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _check_analyze_entities_result(self, entities):

def test_analyze_entities(self):
document = Config.CLIENT.document_from_text(self.TEXT_CONTENT)
entities = document.analyze_entities()
entities = document.analyze_entities().entities
self._check_analyze_entities_result(entities)

def test_analyze_entities_from_blob(self):
Expand All @@ -114,13 +114,13 @@ def test_analyze_entities_from_blob(self):
# Create a document referencing that blob.
gcs_url = 'gs://%s/%s' % (bucket_name, blob_name)
document = Config.CLIENT.document_from_url(gcs_url)
entities = document.analyze_entities()
entities = document.analyze_entities().entities
self._check_analyze_entities_result(entities)

def test_analyze_sentiment(self):
positive_msg = 'Jogging is fun'
document = Config.CLIENT.document_from_text(positive_msg)
sentiment = document.analyze_sentiment()
sentiment = document.analyze_sentiment().sentiment
self.assertEqual(sentiment.score, 0.5)
self.assertTrue(0.0 < sentiment.magnitude < 1.5)

Expand All @@ -147,5 +147,5 @@ def _check_analyze_syntax_result(self, tokens):
def test_analyze_syntax(self):
positive_msg = 'Jogging is fun'
document = Config.CLIENT.document_from_text(positive_msg)
tokens = document.analyze_syntax()
tokens = document.analyze_syntax().tokens
self._check_analyze_syntax_result(tokens)

0 comments on commit c0448da

Please sign in to comment.