File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11"""Enhanced, asyncio-compatible client for AWS Step Functions."""
22
3- __version__ = "0.3 .0"
3+ __version__ = "0.4 .0"
Original file line number Diff line number Diff line change 11"""Constants and configuration for the workflow client"""
22import os
33
4- AWS_ACCOUNT_ID = os .environ .get ("AWS_ACCOUNT_ID" )
4+ import boto3
5+
6+ AWS_ACCOUNT_ID = os .environ .get (
7+ "AWS_ACCOUNT_ID" , boto3 .client ("sts" ).get_caller_identity ()["Account" ]
8+ )
59
610# URL for making requests to the Step Functions API. You would most likely only set
711# this in order to hit the local py2sfn mock server.
Original file line number Diff line number Diff line change 33import os
44import unittest
55
6+ from sfn_workflow_client .config import AWS_ACCOUNT_ID
67from sfn_workflow_client .workflow import Workflow
78
89
@@ -15,7 +16,7 @@ def test_init(self):
1516 self .assertEqual (workflow .name , "test" )
1617 self .assertEqual (
1718 workflow .state_machine_arn ,
18- f"arn:aws:states:{ os .environ .get ('AWS_DEFAULT_REGION' )} :{ os . environ . get ( ' AWS_ACCOUNT_ID' ) } :stateMachine:test" ,
19+ f"arn:aws:states:{ os .environ .get ('AWS_DEFAULT_REGION' )} :{ AWS_ACCOUNT_ID } :stateMachine:test" ,
1920 )
2021 self .assertEqual (len (workflow .executions ), 0 )
2122
You can’t perform that action at this time.
0 commit comments