import pytest from image_prediction.config import CONFIG from image_prediction.transformer.transformers.response import get_class_specific_filter_value @pytest.fixture def label(): return "signature" def test_read_environment_vars_for_thresholds(label): assert get_class_specific_filter_value(label, CONFIG, "image_to_page_quotient", "min") == 0.05 assert get_class_specific_filter_value(label, CONFIG, "image_to_page_quotient", "max") == 0.4 assert get_class_specific_filter_value(label, CONFIG, "image_width_to_height_quotient", "min") == 0.1 assert get_class_specific_filter_value(label, CONFIG, "image_width_to_height_quotient", "max") == 10 assert get_class_specific_filter_value(label, CONFIG, "confidence", "min") == 0.5