File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
tests/tests_transfers/aws Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,23 @@ def setup_aws_connection(project: DataShuttle):
3434 The `AWS_SECRET_ACCESS_KEY` is set in the environment by the CI while
3535 testing. For testing locally, the developer must set it themselves.
3636 """
37+
38+ def mock_input (_ : str ) -> str :
39+ return "y"
40+
41+ import builtins
42+
43+ original_input = copy .deepcopy (builtins .input )
44+ builtins .input = mock_input # type: ignore
45+
3746 original_get_secret = copy .deepcopy (aws .get_aws_secret_access_key )
3847 aws .get_aws_secret_access_key = lambda * args , ** kwargs : os .environ [
3948 "AWS_SECRET_ACCESS_KEY"
4049 ]
4150
4251 project .setup_aws_connection ()
4352
53+ builtins .input = original_input
4454 aws .get_aws_secret_access_key = original_get_secret
4555
4656
You can’t perform that action at this time.
0 commit comments