From 69b8588a194621311b7371d2f6662c895a8c699b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awek=20Kap=C5=82o=C5=84ski?= Date: Sun, 24 Sep 2017 19:40:18 +0000 Subject: [PATCH] Remove translation of help messages from tests There is no need to translate help message for config option which is added and used only in tests. Change-Id: I8b8bdd4131e6183245bcd2556b2107d769fd6427 --- neutron/tests/common/agents/l3_agent.py | 3 +-- neutron/tests/fullstack/cmd/dhcp_agent.py | 2 +- neutron/tests/functional/agent/linux/simple_daemon.py | 9 ++++----- neutron/tests/functional/cmd/process_spawn.py | 11 +++++------ 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/neutron/tests/common/agents/l3_agent.py b/neutron/tests/common/agents/l3_agent.py index fcc46890f4c..ace75ff3c2e 100755 --- a/neutron/tests/common/agents/l3_agent.py +++ b/neutron/tests/common/agents/l3_agent.py @@ -18,7 +18,6 @@ import types import mock from oslo_config import cfg -from neutron._i18n import _ from neutron.agent.l3 import agent from neutron.agent.l3 import namespaces from neutron.agent import l3_agent @@ -98,7 +97,7 @@ def get_external_device_name(ri, port_id): OPTS = [ cfg.StrOpt('test_namespace_suffix', default='testprefix', - help=_("Suffix to append to all namespace names.")), + help="Suffix to append to all namespace names."), ] diff --git a/neutron/tests/fullstack/cmd/dhcp_agent.py b/neutron/tests/fullstack/cmd/dhcp_agent.py index c8f9c5150d5..dc1ea5fb70d 100755 --- a/neutron/tests/fullstack/cmd/dhcp_agent.py +++ b/neutron/tests/fullstack/cmd/dhcp_agent.py @@ -26,7 +26,7 @@ from neutron.cmd.eventlet.agents import dhcp as dhcp_agent OPTS = [ cfg.StrOpt('test_namespace_suffix', default='testprefix', - help=_("Suffix to append to all DHCP namespace names.")), + help="Suffix to append to all DHCP namespace names."), ] diff --git a/neutron/tests/functional/agent/linux/simple_daemon.py b/neutron/tests/functional/agent/linux/simple_daemon.py index fa8b047dad1..8e3c0d4d4f9 100644 --- a/neutron/tests/functional/agent/linux/simple_daemon.py +++ b/neutron/tests/functional/agent/linux/simple_daemon.py @@ -16,7 +16,6 @@ import time from oslo_config import cfg -from neutron._i18n import _ from neutron.agent.linux import daemon @@ -35,12 +34,12 @@ def main(): opts = [ cfg.StrOpt('uuid', - help=_('uuid provided from the command line ' - 'so external_process can track us via /proc/' - 'cmdline interface.'), + help='uuid provided from the command line ' + 'so external_process can track us via /proc/' + 'cmdline interface.', required=True), cfg.StrOpt('pid_file', - help=_('Location of pid file of this process.'), + help='Location of pid file of this process.', required=True) ] diff --git a/neutron/tests/functional/cmd/process_spawn.py b/neutron/tests/functional/cmd/process_spawn.py index b3718c37997..681bcc702da 100644 --- a/neutron/tests/functional/cmd/process_spawn.py +++ b/neutron/tests/functional/cmd/process_spawn.py @@ -22,7 +22,6 @@ import time from neutron_lib import constants as n_const from oslo_config import cfg -from neutron._i18n import _ from neutron.agent.linux import daemon UNIX_FAMILY = 'UNIX' @@ -31,13 +30,13 @@ OPTS = [ cfg.IntOpt('num_children', short='n', default=0, - help=_('Number of children to spawn'), + help='Number of children to spawn', required=False), cfg.StrOpt('family', short='f', default=n_const.IPv4, choices=[n_const.IPv4, n_const.IPv6, UNIX_FAMILY], - help=_('Listen socket family (%(v4)s, %(v6)s or %(unix)s)') % + help='Listen socket family (%(v4)s, %(v6)s or %(unix)s)' % { 'v4': n_const.IPv4, 'v6': n_const.IPv6, @@ -48,7 +47,7 @@ OPTS = [ short='p', default=n_const.PROTO_NAME_TCP, choices=[n_const.PROTO_NAME_TCP, n_const.PROTO_NAME_UDP], - help=_('Protocol (%(tcp)s or %(udp)s)') % + help='Protocol (%(tcp)s or %(udp)s)' % { 'tcp': n_const.PROTO_NAME_TCP, 'udp': n_const.PROTO_NAME_UDP @@ -57,12 +56,12 @@ OPTS = [ cfg.BoolOpt('parent_listen', short='pl', default=True, - help=_('Parent process must listen too'), + help='Parent process must listen too', required=False), cfg.BoolOpt('ignore_sigterm', short='i', default=False, - help=_('Ignore SIGTERM'), + help='Ignore SIGTERM', required=False) ]