@@ -106,9 +106,10 @@ def test_service_connect__attr_with_default_value():
106106 # but input of an empty line accepts the default.
107107 assert "attr (example) [PRESET]: " in result .output
108108 service_config = runtime .keychain .get_service ("test" , "test-alias" )
109- with mock .patch (
110- "cumulusci.core.config.base_config.STRICT_GETATTR" , False
111- ), pytest .warns (DeprecationWarning , match = "attr" ):
109+ with (
110+ mock .patch ("cumulusci.core.config.base_config.STRICT_GETATTR" , False ),
111+ pytest .warns (DeprecationWarning , match = "attr" ),
112+ ):
112113 assert service_config .lookup ("attr" ) == "PRESET"
113114 assert service_config .attr == "PRESET"
114115
@@ -132,9 +133,10 @@ def test_service_connect__attr_with_default_factory():
132133
133134 # The service should have the attribute value returned by the default factory.
134135 service_config = runtime .keychain .get_service ("test" , "test-alias" )
135- with mock .patch (
136- "cumulusci.core.config.base_config.STRICT_GETATTR" , False
137- ), pytest .warns (DeprecationWarning , match = "attr" ):
136+ with (
137+ mock .patch ("cumulusci.core.config.base_config.STRICT_GETATTR" , False ),
138+ pytest .warns (DeprecationWarning , match = "attr" ),
139+ ):
138140 assert service_config .lookup ("attr" ) == "CALCULATED"
139141 assert service_config .attr == "CALCULATED"
140142
@@ -155,13 +157,14 @@ def test_service_connect__alias_already_exists():
155157 "test-type" ,
156158 "already-exists" ,
157159 runtime = runtime ,
158- input = "new\n y\n " ,
160+ input = "new\n y\n n \ n " ,
159161 )
160162
161163 service_config = runtime .keychain .get_service ("test-type" , "already-exists" )
162- with mock .patch (
163- "cumulusci.core.config.base_config.STRICT_GETATTR" , False
164- ), pytest .warns (DeprecationWarning , match = "attr" ):
164+ with (
165+ mock .patch ("cumulusci.core.config.base_config.STRICT_GETATTR" , False ),
166+ pytest .warns (DeprecationWarning , match = "attr" ),
167+ ):
165168 assert service_config .lookup ("attr" ) == "new"
166169 assert service_config .attr == "new"
167170
@@ -536,7 +539,7 @@ def test_service_connect__connected_app():
536539 "connect" ,
537540 "connected_app" ,
538541 "new" ,
539- input = "\n \n ID\n SECRET\n " ,
542+ input = "\n \n ID\n SECRET\n n \ n " ,
540543 runtime = runtime ,
541544 )
542545
@@ -559,7 +562,7 @@ def test_service_connect__connected_app__with_cli_options():
559562 "new" ,
560563 "--login_url" ,
561564 "https://custom" ,
562- input = "\n ID\n SECRET\n " , # not prompted for login_url
565+ input = "\n ID\n SECRET\n n \ n " , # not prompted for login_url
563566 runtime = runtime ,
564567 )
565568
0 commit comments