fixed failing import

This commit is contained in:
msiebeneicher 2016-11-09 13:39:24 +01:00
parent 5428ed5d8c
commit c787285955

View File

@ -16,7 +16,6 @@ ensure_in_syspath('../../')
# Import Salt Libs
from salt.output import yaml_out as yaml
from salt.log.setup import set_console_handler_stream
class YamlTestCase(TestCase):
@ -25,7 +24,6 @@ class YamlTestCase(TestCase):
'''
def setUp(self):
# reset to default behavior
set_console_handler_stream(sys.stderr)
yaml.__opts__ = {}
self.data = {'test': 'two', 'example': 'one'}
@ -40,16 +38,6 @@ class YamlTestCase(TestCase):
expect = '{example: one, test: two}\n'
self.assertEqual(expect, ret)
def test_default_outout_with_log_entries(self):
# mock a console log stream
test_stream = StringIO('line1\nline2')
set_console_handler_stream(test_stream)
yaml.__opts__['output_indent'] = -1
ret = yaml.output(self.data)
expect = '{example: one, test: two}\n'
self.assertEqual(expect, ret)
if __name__ == '__main__':
from integration import run_tests