summaryrefslogtreecommitdiff
path: root/cloudinit/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/cmd')
-rw-r--r--cloudinit/cmd/tests/test_clean.py2
-rw-r--r--cloudinit/cmd/tests/test_status.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/cmd/tests/test_clean.py b/cloudinit/cmd/tests/test_clean.py
index af438aab..1379740b 100644
--- a/cloudinit/cmd/tests/test_clean.py
+++ b/cloudinit/cmd/tests/test_clean.py
@@ -151,7 +151,7 @@ class TestClean(CiTestCase):
'sys.argv': {'new': ['clean', '--logs']}},
clean.main)
- self.assertEqual(0, context_manager.exception.code)
+ self.assertRaisesCodeEqual(0, context_manager.exception.code)
self.assertFalse(
os.path.exists(self.log1), 'Unexpected log {0}'.format(self.log1))
diff --git a/cloudinit/cmd/tests/test_status.py b/cloudinit/cmd/tests/test_status.py
index 8ec9b5bc..6d4a11e8 100644
--- a/cloudinit/cmd/tests/test_status.py
+++ b/cloudinit/cmd/tests/test_status.py
@@ -347,7 +347,7 @@ class TestStatus(CiTestCase):
'_is_cloudinit_disabled': (False, ''),
'Init': {'side_effect': self.init_class}},
status.main)
- self.assertEqual(0, context_manager.exception.code)
+ self.assertRaisesCodeEqual(0, context_manager.exception.code)
self.assertEqual('status: running\n', m_stdout.getvalue())
# vi: ts=4 expandtab syntax=python