summaryrefslogtreecommitdiff
path: root/nova/tests/unit/test_hacking.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/tests/unit/test_hacking.py')
-rw-r--r--nova/tests/unit/test_hacking.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/nova/tests/unit/test_hacking.py b/nova/tests/unit/test_hacking.py
index 8aa304ba1c..b9f413e52b 100644
--- a/nova/tests/unit/test_hacking.py
+++ b/nova/tests/unit/test_hacking.py
@@ -709,22 +709,21 @@ class HackingTestCase(test.NoDBTestCase):
def test_log_context(self):
code = """
- LOG.info(_LI("Rebooting instance"),
- context=context, instance=instance)
+ LOG.info("Rebooting instance",
+ context=context, instance=instance)
"""
errors = [(1, 0, 'N353')]
self._assert_has_errors(code, checks.check_context_log,
expected_errors=errors)
code = """
- LOG.info(_LI("Rebooting instance"),
- context=admin_context, instance=instance)
+ LOG.info("Rebooting instance",
+ context=admin_context, instance=instance)
"""
errors = [(1, 0, 'N353')]
self._assert_has_errors(code, checks.check_context_log,
expected_errors=errors)
code = """
- LOG.info(_LI("Rebooting instance"),
- instance=instance)
+ LOG.info("Rebooting instance", instance=instance)
"""
self._assert_has_no_errors(code, checks.check_context_log)