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.run_function(
|
||||
'test.fib',
|
||||
['40'],
|
||||
)[0][-1],
|
||||
34
|
||||
['20'],
|
||||
)[0],
|
||||
6765
|
||||
)
|
||||
|
||||
|
||||
|
@ -88,10 +88,10 @@ class PublishModuleTest(integration.ModuleCase,
|
||||
'''
|
||||
ret = self.run_function(
|
||||
'publish.full_data',
|
||||
['minion', 'test.fib', 40]
|
||||
['minion', 'test.fib', 20]
|
||||
)
|
||||
self.assertTrue(ret)
|
||||
self.assertEqual(ret['minion']['ret'][0][-1], 34)
|
||||
self.assertEqual(ret['minion']['ret'][0], 6765)
|
||||
|
||||
def test_kwarg(self):
|
||||
'''
|
||||
|
@ -73,9 +73,9 @@ class TestModuleTest(integration.ModuleCase,
|
||||
self.assertEqual(
|
||||
self.run_function(
|
||||
'test.fib',
|
||||
['40'],
|
||||
)[0][-1],
|
||||
34
|
||||
['20'],
|
||||
)[0],
|
||||
6765
|
||||
)
|
||||
|
||||
def test_collatz(self):
|
||||
|
@ -34,18 +34,15 @@ class CallTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
||||
out = self.run_call('-l quiet test.fib 3')
|
||||
|
||||
expect = ['local:',
|
||||
' |_',
|
||||
' - 0',
|
||||
' - 1',
|
||||
' - 1',
|
||||
' - 2']
|
||||
' - 2',
|
||||
' - 3.09944152832e-06',]
|
||||
self.assertEqual(expect, out[:-1])
|
||||
|
||||
def test_text_output(self):
|
||||
out = self.run_call('-l quiet --out txt test.fib 3')
|
||||
|
||||
expect = [
|
||||
'local: ([0, 1, 1, 2]'
|
||||
'local: (2,'
|
||||
]
|
||||
|
||||
self.assertEqual(''.join(expect), ''.join(out).rsplit(",", 1)[0])
|
||||
|
Loading…
Reference in New Issue
Block a user