Skip to content

Commit

Permalink
fix assert check
Browse files Browse the repository at this point in the history
Signed-off-by: Samhita Alla <[email protected]>
  • Loading branch information
samhita-alla committed Feb 19, 2025
1 parent b466614 commit d2af43f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/flytekit-aws-sagemaker/tests/test_boto3_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
@mock.patch(
"flytekitplugins.awssagemaker_inference.boto3_agent.Boto3AgentMixin._call",
)
async def test_agent(mock_boto_call, mock_return_value):
async def test_agent(mock_boto_call, mock_return_value, request):
mock_boto_call.return_value = mock_return_value[0]

agent = AgentRegistry.get_agent("boto")
Expand Down Expand Up @@ -158,7 +158,9 @@ async def test_agent(mock_boto_call, mock_return_value):
)

assert resource.phase == TaskExecution.SUCCEEDED
assert isinstance(resource.outputs, literals.LiteralMap)

if request.node.callspec.indices["mock_return_value"] in (0, 1):
assert isinstance(resource.outputs, literals.LiteralMap)

if mock_return_value[0][0]:
outputs = literal_map_string_repr(resource.outputs)
Expand Down

0 comments on commit d2af43f

Please sign in to comment.