@@ -167,9 +167,10 @@ def test_config_force_with_update_specs(self, yaml_mock):
167
167
self .assertEqual (config .update_specs , True )
168
168
169
169
@patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
170
- def test_config_expand_paths (self , yaml_mock ):
170
+ @patch ("sys.stdin.isatty" , return_va = True )
171
+ def test_config_expand_paths (self , isatty_mock , yaml_mock ):
171
172
"""Test precedence in"""
172
-
173
+ isatty_mock . return_value = True
173
174
yaml_mock .side_effect = [
174
175
{"templates" : ["test/fixtures/templates/public/*.yaml" ]},
175
176
{},
@@ -198,10 +199,12 @@ def test_config_expand_paths(self, yaml_mock):
198
199
)
199
200
200
201
@patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
201
- def test_config_expand_paths_nomatch (self , yaml_mock ):
202
+ @patch ("sys.stdin.isatty" , return_va = True )
203
+ def test_config_expand_paths_nomatch (self , isatty_mock , yaml_mock ):
202
204
"""Test precedence in"""
203
205
204
206
filename = "test/fixtures/templates/nonexistant/*.yaml"
207
+ isatty_mock .return_value = True
205
208
yaml_mock .side_effect = [
206
209
{"templates" : [filename ]},
207
210
{},
@@ -212,10 +215,14 @@ def test_config_expand_paths_nomatch(self, yaml_mock):
212
215
self .assertEqual (len (config .templates ), 1 )
213
216
214
217
@patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
215
- def test_config_expand_paths_nomatch_ignore_bad_template (self , yaml_mock ):
218
+ @patch ("sys.stdin.isatty" , return_va = True )
219
+ def test_config_expand_paths_nomatch_ignore_bad_template (
220
+ self , isatty_mock , yaml_mock
221
+ ):
216
222
"""Test precedence in"""
217
223
218
224
filename = "test/fixtures/templates/nonexistant/*.yaml"
225
+ isatty_mock .return_value = True
219
226
yaml_mock .side_effect = [
220
227
{"templates" : [filename ], "ignore_bad_template" : True },
221
228
{},
@@ -226,9 +233,10 @@ def test_config_expand_paths_nomatch_ignore_bad_template(self, yaml_mock):
226
233
self .assertEqual (config .templates , [])
227
234
228
235
@patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
229
- def test_config_expand_ignore_templates (self , yaml_mock ):
236
+ @patch ("sys.stdin.isatty" , return_va = True )
237
+ def test_config_expand_ignore_templates (self , isatty_mock , yaml_mock ):
230
238
"""Test ignore templates"""
231
-
239
+ isatty_mock . return_value = True
232
240
yaml_mock .side_effect = [
233
241
{
234
242
"templates" : ["test/fixtures/templates/bad/resources/iam/*.yaml" ],
@@ -248,9 +256,13 @@ def test_config_expand_ignore_templates(self, yaml_mock):
248
256
self .assertEqual (len (config .templates ), 3 )
249
257
250
258
@patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
251
- def test_config_expand_and_ignore_templates_with_bad_path (self , yaml_mock ):
259
+ @patch ("sys.stdin.isatty" , return_va = True )
260
+ def test_config_expand_and_ignore_templates_with_bad_path (
261
+ self , isatty_mock , yaml_mock
262
+ ):
252
263
"""Test ignore templates"""
253
264
265
+ isatty_mock .return_value = True
254
266
yaml_mock .side_effect = [
255
267
{
256
268
"templates" : ["test/fixtures/templates/bad/resources/iam/*.yaml" ],
@@ -270,9 +282,11 @@ def test_config_expand_and_ignore_templates_with_bad_path(self, yaml_mock):
270
282
self .assertEqual (len (config .templates ), 4 )
271
283
272
284
@patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
273
- def test_config_merge (self , yaml_mock ):
285
+ @patch ("sys.stdin.isatty" , return_va = True )
286
+ def test_config_merge (self , isatty_mock , yaml_mock ):
274
287
"""Test merging lists"""
275
288
289
+ isatty_mock .return_value = True
276
290
yaml_mock .side_effect = [
277
291
{
278
292
"include_checks" : ["I" ],
0 commit comments