def test_severity_set_successful(self):
        """
        When we add custom severity enum values to the config
        and call TicketFieldConfigCommand.set_fields_from_config()
        we expect the Trac environments severity enums to be updated with our
        custom values and removal of the default values.
        """
        # We create an instance of the panel so we can check existing values
        panel = SeverityAdminPanel(self.env)

        # Check the environment initially contains the default values.
        self.assertItemsEqual(panel.get_enum_list(), self.default['severity'])

        # create the section, option, and values in configuration
        self.env.config.set('ticket-field-config', 'severity',
                            ','.join(self.new['severity']))

        admin_command = TicketFieldConfigCommand(self.env)

        # run our plugin
        admin_command.set_fields_from_config()

        self.assertItemsEqual(panel.get_enum_list(), self.new['severity'])
 def list_severity_in_json(self):
     panel = SeverityAdminPanel(self.env)
     printout(json.dumps(panel.get_enum_list()))