Skip to content

Commit

Permalink
fix(tests.openadapt.privacy.providers): failing `test_comprehend_scru…
Browse files Browse the repository at this point in the history
…b.py` (#488)

* skip all the tests if ther is an issue wiht aws config files, either they are not htere or incorrect values are porided

* format
  • Loading branch information
KrishPatel13 authored Aug 30, 2023
1 parent 5fa12eb commit cec2a53
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/openadapt/privacy/providers/test_comprehend_scrub.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
"""Module to test ComprehendScrubbingProvider."""

from botocore.exceptions import NoRegionError
import pytest

from openadapt.privacy.providers.aws_comprehend import ComprehendScrubbingProvider

scrub = ComprehendScrubbingProvider()

try:
scrub.scrub_text("hello Bob smith")
except NoRegionError:
msg = (
"AWS Config Files not setup correctly. Please see "
"https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html#configuration" # noqa: E501
)
pytestmark = pytest.mark.skip(reason=msg)


def _hex_to_rgb(hex_color: int) -> tuple[int, int, int]:
"""Convert a hex color (int) to RGB.
Expand Down

0 comments on commit cec2a53

Please sign in to comment.