From 4c3fbe2639664c25d3c06522f9c85713e65bb893 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 9 Aug 2017 15:23:54 +0000 Subject: [PATCH] Define shell.COMMANDS explicitly to avoid random UT failure Mocking non-existing attribute causes UT faillure. As a result, neutronclient UT fails depending on executing order of tests. Change-Id: Id047527fba9e908938f7157781fb0e36e76011c7 Closes-Bug: #1709652 --- neutronclient/shell.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neutronclient/shell.py b/neutronclient/shell.py index 4045b8b89..4814c8118 100644 --- a/neutronclient/shell.py +++ b/neutronclient/shell.py @@ -103,6 +103,9 @@ def check_non_negative_int(value): return value +COMMANDS = {} + + # NOTE(amotoki): This is only to provide compatibility # to existing neutron CLI extensions. See bug 1706573 for detail. def _set_commands_dict_for_compat(apiversion, command_manager):