@@ -140,7 +140,7 @@ def test_raises_exception_main_function(self):
140
140
# my attempts to mock sys.stderr didn't work with pytest
141
141
# This will get the error message passed to logging.warning
142
142
# as a parameter
143
- with patch ('logging.error ' ) as log :
143
+ with patch ('logging.warning ' ) as log :
144
144
old_argv = sys .argv
145
145
args = ['get' , '--root-dir' , self .tmproot ]
146
146
sys .argv = [old_argv [0 ]] + args
@@ -160,7 +160,7 @@ def test_raises_exception_main_function_permission_denied(self):
160
160
161
161
os .chmod (os .path .join (self .tmproot , 'etc/netplan/test.yaml' ), 0 )
162
162
163
- with patch ('logging.error ' ) as log :
163
+ with patch ('logging.warning ' ) as log :
164
164
old_argv = sys .argv
165
165
args = ['get' , '--root-dir' , self .tmproot ]
166
166
sys .argv = [old_argv [0 ]] + args
@@ -177,7 +177,7 @@ def test_get_validation_error_exception(self):
177
177
eth0:
178
178
set-name: abc''' )
179
179
180
- with patch ('logging.error ' ) as log :
180
+ with patch ('logging.warning ' ) as log :
181
181
old_argv = sys .argv
182
182
args = ['get' , '--root-dir' , self .tmproot ]
183
183
sys .argv = [old_argv [0 ]] + args
@@ -196,7 +196,7 @@ def test_set_generic_validation_error_exception(self):
196
196
- table: 200
197
197
to: 1.2.3.4''' )
198
198
199
- with patch ('logging.error ' ) as log :
199
+ with patch ('logging.warning ' ) as log :
200
200
old_argv = sys .argv
201
201
args = ['get' , '--root-dir' , self .tmproot ]
202
202
sys .argv = [old_argv [0 ]] + args
0 commit comments