aws-samples / aws-samples/amazon-textract-textractor

Remove calls to Textract from prettyprinter tests

Open
#155 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
493
Forks
163
PR merge metrics
No merged PRs in 30d

Description

Tests for prettyprinter call Textract directly instead of using JSON

```
def test_pretty_with_tables():
features = [Textract_Features.FORMS, Textract_Features.TABLES]
textract_client = boto3.client('textract', region_name='us-east-2')

response = call_textract(input_document="s3://amazon-textract-public-content/blogs/w2-example.png",
features=features,
boto3_textract_client=textract_client)
assert response
tables_result = get_tables_string(textract_json=response)
assert len(tables_result) > 0

response = call_textract(input_document="s3://amazon-textract-public-content/blogs/employmentapp.png",
features=features,
boto3_textract_client=textract_client)
assert response
tables_result = get_tables_string(textract_json=response)
assert len(tables_result) > 0
```

remove those calls and replace with JSON.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.