fixed integration tests after json output change

This commit is contained in:
msiebeneicher 2016-10-12 16:05:29 +02:00
parent 9e264812cb
commit db19e31038
2 changed files with 9 additions and 9 deletions

View file

@ -34,9 +34,9 @@ class OutputReturnTest(integration.ShellCase):
'''
ret = self.run_call('test.ping --out=json')
self.assertIn('{', ret)
self.assertIn('"local": true', ret)
self.assertIn('"logs": [', ret)
self.assertIn('}', ret)
self.assertIn('"local": true', ''.join(ret))
self.assertIn('"logs": [', ''.join(ret))
self.assertIn('}', ''.join(ret))
def test_output_nested(self):
'''

View file

@ -67,16 +67,16 @@ class CallTest(integration.ShellCase, testprogram.TestProgramCase, integration.S
def test_json_out_indent(self):
out = self.run_call('test.ping -l quiet --out=json --out-indent=-1')
self.assertIn('"local": true', out)
self.assertIn('"logs": [', out)
self.assertIn('"local": true', ''.join(out))
self.assertIn('"logs": [', ''.join(out))
out = self.run_call('test.ping -l quiet --out=json --out-indent=0')
self.assertIn('"local": true', out)
self.assertIn('"logs": [', out)
self.assertIn('"local": true', ''.join(out))
self.assertIn('"logs": [', ''.join(out))
out = self.run_call('test.ping -l quiet --out=json --out-indent=1')
self.assertIn('"local": true', out)
self.assertIn('"logs": [', out)
self.assertIn('"local": true', ''.join(out))
self.assertIn('"logs": [', ''.join(out))
def test_local_sls_call(self):
fileroot = os.path.join(integration.FILES, 'file', 'base')