diff --git a/application/quality_checker/tests/test_quality_checker.py b/application/quality_checker/tests/test_quality_checker.py index 496a0721a..5a05f8d74 100644 --- a/application/quality_checker/tests/test_quality_checker.py +++ b/application/quality_checker/tests/test_quality_checker.py @@ -1,10 +1,16 @@ from dataclasses import dataclass +from os import environ from unittest.mock import MagicMock, call, patch import pytest from aws_lambda_powertools.utilities.typing import LambdaContext -from application.quality_checker.quality_checker import check_dos_data_quality, lambda_handler +from application.quality_checker.quality_checker import ( + check_dos_data_quality, + lambda_handler, + send_errored_metric, + send_finished_metric, +) from common.commissioned_service_type import BLOOD_PRESSURE, CONTRACEPTION, PALLIATIVE_CARE FILE_PATH = "application.quality_checker.quality_checker" @@ -63,3 +69,21 @@ def test_check_dos_data_quality( call(mock_connect_to_db_reader().__enter__(), CONTRACEPTION), ], ) + + +def test_send_finished_metric(): + # Arrange + environ["ENV"] = "test" + # Act + send_finished_metric() + # Clean up + del environ["ENV"] + + +def test_send_errored_metric(): + # Arrange + environ["ENV"] = "test" + # Act + send_errored_metric() + # Clean up + del environ["ENV"]