Skip to content

Commit 98504bf

Browse files
committed
refactor: replace ad-hoc bedrock skipif with require_api_key predicate
1 parent 11ec7d0 commit 98504bf

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

test/backends/test_bedrock.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import os
2-
31
import openai
42
import pytest
53

@@ -9,15 +7,12 @@
97
from mellea.backends.bedrock import create_bedrock_mantle_backend
108
from mellea.backends.openai import OpenAIBackend
119
from mellea.stdlib.context import ChatContext
10+
from test.predicates import require_api_key
1211

13-
# Skip entire module in CI since the single test is qualitative
1412
pytestmark = [
1513
pytest.mark.e2e,
1614
pytest.mark.bedrock,
17-
pytest.mark.skipif(
18-
"AWS_BEARER_TOKEN_BEDROCK" not in os.environ.keys(),
19-
reason="Skipping Bedrock backend tests if $AWS_BEARER_TOKEN_BEDROCK is not set.",
20-
),
15+
require_api_key("AWS_BEARER_TOKEN_BEDROCK"),
2116
]
2217

2318

0 commit comments

Comments
 (0)