Skip to content

Commit 8aa84eb

Browse files
committed
Refactoring some tests.
1 parent 5249d09 commit 8aa84eb

File tree

5 files changed

+1776
-1786
lines changed

5 files changed

+1776
-1786
lines changed

testing/test_awswrangler/test_cloudwatch.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import awswrangler as wr
88
from awswrangler import exceptions
99

10-
from ._utils import CFN_VALID_STATUS
10+
from ._utils import extract_cloudformation_outputs
1111

1212
logging.basicConfig(level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s")
1313
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
@@ -16,12 +16,7 @@
1616

1717
@pytest.fixture(scope="module")
1818
def cloudformation_outputs():
19-
response = boto3.client("cloudformation").describe_stacks(StackName="aws-data-wrangler")
20-
stack = [x for x in response.get("Stacks") if x["StackStatus"] in CFN_VALID_STATUS][0]
21-
outputs = {}
22-
for output in stack.get("Outputs"):
23-
outputs[output.get("OutputKey")] = output.get("OutputValue")
24-
yield outputs
19+
yield extract_cloudformation_outputs()
2520

2621

2722
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)