Skip to content

Commit

Permalink
Fix incorrectly written test (#34000)
Browse files Browse the repository at this point in the history
This should be using the test suite method of generating opts
  • Loading branch information
Mike Place authored and Nicole Thomas committed Jun 14, 2016
1 parent cf6281b commit f758e42
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/integration/output/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@

# Import Salt Testing Libs
from salttesting.helpers import ensure_in_syspath
from salttesting.mixins import RUNTIME_VARS

ensure_in_syspath('../../')

# Import Salt libs
import integration
import salt.config
from salt.output import display_output


Expand Down Expand Up @@ -85,15 +87,15 @@ def test_output_unicodebad(self):
'''
Tests outputter reliability with utf8
'''
opts = copy.deepcopy(self.minion_opts)
opts = salt.config.minion_config(os.path.join(RUNTIME_VARS.TMP_CONF_DIR, 'minion'))
opts['output_file'] = os.path.join(
self.minion_opts['root_dir'], 'outputtest')
opts['root_dir'], 'outputtest')
data = {'foo': {'result': False,
'aaa': 'azerzaeréééé',
'comment': u'ééééàààà'}}
try:
# this should not raises UnicodeEncodeError
display_output(data, opts=self.minion_opts)
display_output(data, opts=opts)
self.assertTrue(True)
except Exception:
# display trace in error message for debugging on jenkins
Expand Down

0 comments on commit f758e42

Please sign in to comment.