2023-04-24 06:51:46 -05:00
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Contains common test fixtures used to run unit tests.
"""
import sys
import boto3
import pytest
from support_wrapper import SupportWrapper
import get_started_support_cases
# This is needed so Python can find test_tools on the path.
2023-10-18 10:35:05 -07:00
sys . path . append ( " ../.. " )
2023-04-24 06:51:46 -05:00
from test_tools . fixtures . common import *
class ScenarioData :
def __init__ ( self , client , stubber ) :
self . client = client
self . stubber = stubber
self . scenario = get_started_support_cases . SupportCasesScenario (
2023-10-18 10:35:05 -07:00
SupportWrapper ( self . client )
)
2023-04-24 06:51:46 -05:00
@pytest.fixture
def scenario_data ( make_stubber ) :
2023-10-18 10:35:05 -07:00
client = boto3 . client ( " support " )
2023-04-24 06:51:46 -05:00
stubber = make_stubber ( client )
return ScenarioData ( client , stubber )
@pytest.fixture ( autouse = True )
def mock_wait ( monkeypatch ) :
2023-10-18 10:35:05 -07:00
monkeypatch . setattr ( get_started_support_cases , " wait " , lambda x : None )