Hacking: a new hacking check was added that used an existing number
Commit 243879f5c51fc45f03491bcb78765945ddf76be8 added in a new hacking check that used an existing number. The new number is 324 (and not 323) Change-Id: I7e604a408387438105c435ad16a1fa3d6491b642 Closes-bug: #1356815
This commit is contained in:
parent
500f0f77a0
commit
a0a6017f9b
@ -36,6 +36,7 @@ Nova Specific Commandments
|
||||
- [N321] Validate that LOG messages, except debug ones, have translations
|
||||
- [N322] Method's default argument shouldn't be mutable
|
||||
- [N323] Ensure that the _() function is explicitly imported to ensure proper translations.
|
||||
- [N324] Ensure that jsonutils.%(fun)s must be used instead of json.%(fun)s
|
||||
|
||||
Creating Unit Tests
|
||||
-------------------
|
||||
|
@ -293,7 +293,7 @@ def use_jsonutils(logical_line, filename):
|
||||
if "plugins/xenserver" in filename:
|
||||
return
|
||||
|
||||
msg = "N323: jsonutils.%(fun)s must be used instead of json.%(fun)s"
|
||||
msg = "N324: jsonutils.%(fun)s must be used instead of json.%(fun)s"
|
||||
|
||||
if "json." in logical_line:
|
||||
json_funcs = ['dumps', 'dump', 'loads', 'load']
|
||||
|
@ -220,7 +220,7 @@ class HackingTestCase(test.NoDBTestCase):
|
||||
|
||||
def test_use_jsonutils(self):
|
||||
def __get_msg(fun):
|
||||
msg = ("N323: jsonutils.%(fun)s must be used instead of "
|
||||
msg = ("N324: jsonutils.%(fun)s must be used instead of "
|
||||
"json.%(fun)s" % {'fun': fun})
|
||||
return (0, msg)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user