mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Fix the test.fib tests
This commit is contained in:
parent
db76878903
commit
cc8785e980
@ -28,9 +28,9 @@ class TestSyndic(integration.SyndicCase):
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.run_function(
|
self.run_function(
|
||||||
'test.fib',
|
'test.fib',
|
||||||
['40'],
|
['20'],
|
||||||
)[0][-1],
|
)[0],
|
||||||
34
|
6765
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,10 +88,10 @@ class PublishModuleTest(integration.ModuleCase,
|
|||||||
'''
|
'''
|
||||||
ret = self.run_function(
|
ret = self.run_function(
|
||||||
'publish.full_data',
|
'publish.full_data',
|
||||||
['minion', 'test.fib', 40]
|
['minion', 'test.fib', 20]
|
||||||
)
|
)
|
||||||
self.assertTrue(ret)
|
self.assertTrue(ret)
|
||||||
self.assertEqual(ret['minion']['ret'][0][-1], 34)
|
self.assertEqual(ret['minion']['ret'][0], 6765)
|
||||||
|
|
||||||
def test_kwarg(self):
|
def test_kwarg(self):
|
||||||
'''
|
'''
|
||||||
|
@ -73,9 +73,9 @@ class TestModuleTest(integration.ModuleCase,
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.run_function(
|
self.run_function(
|
||||||
'test.fib',
|
'test.fib',
|
||||||
['40'],
|
['20'],
|
||||||
)[0][-1],
|
)[0],
|
||||||
34
|
6765
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_collatz(self):
|
def test_collatz(self):
|
||||||
|
@ -34,18 +34,15 @@ class CallTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||||||
out = self.run_call('-l quiet test.fib 3')
|
out = self.run_call('-l quiet test.fib 3')
|
||||||
|
|
||||||
expect = ['local:',
|
expect = ['local:',
|
||||||
' |_',
|
' - 2',
|
||||||
' - 0',
|
' - 3.09944152832e-06',]
|
||||||
' - 1',
|
|
||||||
' - 1',
|
|
||||||
' - 2']
|
|
||||||
self.assertEqual(expect, out[:-1])
|
self.assertEqual(expect, out[:-1])
|
||||||
|
|
||||||
def test_text_output(self):
|
def test_text_output(self):
|
||||||
out = self.run_call('-l quiet --out txt test.fib 3')
|
out = self.run_call('-l quiet --out txt test.fib 3')
|
||||||
|
|
||||||
expect = [
|
expect = [
|
||||||
'local: ([0, 1, 1, 2]'
|
'local: (2,'
|
||||||
]
|
]
|
||||||
|
|
||||||
self.assertEqual(''.join(expect), ''.join(out).rsplit(",", 1)[0])
|
self.assertEqual(''.join(expect), ''.join(out).rsplit(",", 1)[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user