def test_get_request_body():
    text = "hello world"
    body = main.get_request_body(text, syntax=True, entities=True, sentiment=False)
    assert body.get("document").get("content") == text

    assert body.get("features").get("extract_syntax") is True
    assert body.get("features").get("extract_entities") is True
    assert body.get("features").get("extract_document_sentiment") is False
示例#2
0
def test_get_request_body():
    text = 'hello world'
    body = main.get_request_body(text, syntax=True, entities=True,
                                 sentiment=False)
    assert body.get('document').get('content') == text

    assert body.get('features').get('extract_syntax') is True
    assert body.get('features').get('extract_entities') is True
    assert body.get('features').get('extract_document_sentiment') is False
示例#3
0
def test_get_request_body():
    text = 'hello world'
    body = main.get_request_body(text, syntax=True, entities=True,
                                 sentiment=False)
    assert body.get('document').get('content') == text

    assert body.get('features').get('extract_syntax') is True
    assert body.get('features').get('extract_entities') is True
    assert body.get('features').get('extract_document_sentiment') is False