Fix the test.fib tests

This commit is contained in:
Colton Myers 2015-04-11 14:48:48 -04:00
parent db76878903
commit cc8785e980
4 changed files with 11 additions and 14 deletions

View File

@ -28,9 +28,9 @@ class TestSyndic(integration.SyndicCase):
self.assertEqual(
self.run_function(
'test.fib',
['40'],
)[0][-1],
34
['20'],
)[0],
6765
)

View File

@ -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):
'''

View File

@ -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):

View File

@ -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])