diff --git a/test/search_api/filters/test_search_api_limit_filter.py b/test/search_api/filters/test_search_api_limit_filter.py index 222e201f..ff3eee8c 100644 --- a/test/search_api/filters/test_search_api_limit_filter.py +++ b/test/search_api/filters/test_search_api_limit_filter.py @@ -31,5 +31,5 @@ def test_valid_limit_value(self, limit_value, search_api_query_document): ], ) def test_invalid_limit_value(self, limit_value): - with pytest.raises((FilterError, Exception)): + with pytest.raises((FilterError, ValueError)): SearchAPILimitFilter(limit_value) diff --git a/test/search_api/filters/test_search_api_skip_filter.py b/test/search_api/filters/test_search_api_skip_filter.py index 4bf6fc5e..db0d666b 100644 --- a/test/search_api/filters/test_search_api_skip_filter.py +++ b/test/search_api/filters/test_search_api_skip_filter.py @@ -37,5 +37,5 @@ def test_valid_skip_value(self, search_api_query_document, skip_value): ], ) def test_invalid_skip_value(self, skip_value): - with pytest.raises((FilterError, Exception)): + with pytest.raises((FilterError, ValueError)): SearchAPISkipFilter(skip_value)