summaryrefslogtreecommitdiff
path: root/cloudinit/tests/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/tests/helpers.py')
-rw-r--r--cloudinit/tests/helpers.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/tests/helpers.py b/cloudinit/tests/helpers.py
index 58f63b69..ccd56793 100644
--- a/cloudinit/tests/helpers.py
+++ b/cloudinit/tests/helpers.py
@@ -171,7 +171,7 @@ class CiTestCase(TestCase):
if self.with_logs:
# Remove the handler we setup
logging.getLogger().handlers = self.old_handlers
- logging.getLogger().level = None
+ logging.getLogger().setLevel(logging.NOTSET)
subp.subp = _real_subp
super(CiTestCase, self).tearDown()
@@ -360,6 +360,9 @@ class HttprettyTestCase(CiTestCase):
httpretty.HTTPretty.allow_net_connect = False
httpretty.reset()
httpretty.enable()
+ # Stop the logging from HttpPretty so our logs don't get mixed
+ # up with its logs
+ logging.getLogger('httpretty.core').setLevel(logging.CRITICAL)
def tearDown(self):
httpretty.disable()