Skip to content

Commit d4ca613

Browse files
committed
Revert "Make tests expect error instead of previous warning"
This reverts commit 9ad55f1.
1 parent 9ad55f1 commit d4ca613

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/cli/test_units.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_raises_exception_main_function(self):
140140
# my attempts to mock sys.stderr didn't work with pytest
141141
# This will get the error message passed to logging.warning
142142
# as a parameter
143-
with patch('logging.error') as log:
143+
with patch('logging.warning') as log:
144144
old_argv = sys.argv
145145
args = ['get', '--root-dir', self.tmproot]
146146
sys.argv = [old_argv[0]] + args
@@ -160,7 +160,7 @@ def test_raises_exception_main_function_permission_denied(self):
160160

161161
os.chmod(os.path.join(self.tmproot, 'etc/netplan/test.yaml'), 0)
162162

163-
with patch('logging.error') as log:
163+
with patch('logging.warning') as log:
164164
old_argv = sys.argv
165165
args = ['get', '--root-dir', self.tmproot]
166166
sys.argv = [old_argv[0]] + args
@@ -177,7 +177,7 @@ def test_get_validation_error_exception(self):
177177
eth0:
178178
set-name: abc''')
179179

180-
with patch('logging.error') as log:
180+
with patch('logging.warning') as log:
181181
old_argv = sys.argv
182182
args = ['get', '--root-dir', self.tmproot]
183183
sys.argv = [old_argv[0]] + args
@@ -196,7 +196,7 @@ def test_set_generic_validation_error_exception(self):
196196
- table: 200
197197
to: 1.2.3.4''')
198198

199-
with patch('logging.error') as log:
199+
with patch('logging.warning') as log:
200200
old_argv = sys.argv
201201
args = ['get', '--root-dir', self.tmproot]
202202
sys.argv = [old_argv[0]] + args

0 commit comments

Comments
 (0)