diff --git a/tests/tests/audio_tests/test_get_transcript.py b/tests/tests/audio_tests/test_get_transcript.py index ccb5009..8b883de 100644 --- a/tests/tests/audio_tests/test_get_transcript.py +++ b/tests/tests/audio_tests/test_get_transcript.py @@ -1,10 +1,9 @@ -import pytest from tests.utils.resource_utils import get_resource_path -@pytest.mark.skip(reason="Need to deploy ASR first") + def test_get_transcription(textual_audio): - path = get_resource_path('banking_customer_support.mp3') + path = get_resource_path("banking_customer_support.mp3") transcript = textual_audio.get_audio_transcript(path) - assert transcript.language=="english" or transcript.language=="en" - assert len(transcript.segments)>0 - assert len(transcript.text)>100 \ No newline at end of file + assert transcript.language == "english" or transcript.language == "en" + assert len(transcript.segments) > 0 + assert len(transcript.text) > 100 diff --git a/tests/tests/audio_tests/test_redact_audio_file.py b/tests/tests/audio_tests/test_redact_audio_file.py index b4e7ac8..2b27551 100644 --- a/tests/tests/audio_tests/test_redact_audio_file.py +++ b/tests/tests/audio_tests/test_redact_audio_file.py @@ -1,7 +1,6 @@ -import pytest from tests.utils.resource_utils import get_resource_path -@pytest.mark.skip(reason="Need to deploy ASR first") + def test_redact_audio_file_does_not_throw(textual_audio): - path = get_resource_path('banking_customer_support.mp3') - textual_audio.redact_audio_file(path, 'output.mp3') + path = get_resource_path("banking_customer_support.mp3") + textual_audio.redact_audio_file(path, "output.mp3") diff --git a/tests/tests/audio_tests/test_redact_transcript.py b/tests/tests/audio_tests/test_redact_transcript.py index 5afc6f6..9b736b2 100644 --- a/tests/tests/audio_tests/test_redact_transcript.py +++ b/tests/tests/audio_tests/test_redact_transcript.py @@ -1,17 +1,23 @@ import re -import pytest from tests.utils.resource_utils import get_resource_path -@pytest.mark.skip(reason="Need to deploy ASR first") + def test_redact_transcript(textual_audio): - path = get_resource_path('banking_customer_support.mp3') + path = get_resource_path("banking_customer_support.mp3") transcript = textual_audio.get_audio_transcript(path) - assert len(transcript.segments)>0, "confirming transcript is likely valid before redacting" + assert len(transcript.segments) > 0, ( + "confirming transcript is likely valid before redacting" + ) - redacted_transcript = textual_audio.redact_audio_transcript(transcript, generator_default='Off',generator_config={'NAME_GIVEN':'Redaction'}) + redacted_transcript = textual_audio.redact_audio_transcript( + transcript, + generator_default="Off", + generator_config={"NAME_GIVEN": "Redaction"}, + ) - assert len(redacted_transcript.redacted_segments)==len(transcript.segments) - + assert len(redacted_transcript.redacted_segments) == len(transcript.segments) - NAME_GIVEN_RE = re.compile(r'\[NAME_GIVEN_[^\]]+\]') - assert bool(NAME_GIVEN_RE.search(redacted_transcript.redacted_text)), "assert we found a redacted first name" \ No newline at end of file + NAME_GIVEN_RE = re.compile(r"\[NAME_GIVEN_[^\]]+\]") + assert bool(NAME_GIVEN_RE.search(redacted_transcript.redacted_text)), ( + "assert we found a redacted first name" + )