File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def _get_plugins_section(self, instance_id):
3939 if not instance_id :
4040 return self ._PLUGINS_CONFIG_SECTION
4141 else :
42- return instance_id + "/" + self ._PLUGINS_CONFIG_SECTION
42+ return ( "%s/%s" % ( instance_id , self ._PLUGINS_CONFIG_SECTION ))
4343
4444 def _get_plugin_status (self , osutils , instance_id , plugin_name ):
4545 return osutils .get_config_value (plugin_name ,
Original file line number Diff line number Diff line change @@ -60,14 +60,18 @@ def _test_get_plugin_section(self, instance_id):
6060 if not instance_id :
6161 self .assertEqual (self ._init ._PLUGINS_CONFIG_SECTION , response )
6262 else :
63- self . assertEqual (
64- instance_id + "/" + self ._init ._PLUGINS_CONFIG_SECTION ,
65- response )
63+ expected_response = (
64+ "%s/%s" % ( instance_id , self ._init ._PLUGINS_CONFIG_SECTION ))
65+ self . assertEqual ( expected_response , response )
6666
6767 def test_get_plugin_section_id (self ):
6868 fake_id = "100"
6969 self ._test_get_plugin_section (instance_id = fake_id )
7070
71+ def test_get_plugin_section_id_int (self ):
72+ fake_id = 100
73+ self ._test_get_plugin_section (instance_id = fake_id )
74+
7175 def test_get_plugin_section_no_id (self ):
7276 self ._test_get_plugin_section (instance_id = None )
7377
You can’t perform that action at this time.
0 commit comments