Fix failing unit test

This commit is contained in:
Erik Johnson 2017-09-25 16:06:33 -05:00
parent f73764481b
commit 5b3be6e8af
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F
2 changed files with 7 additions and 1 deletions

View file

@ -1305,7 +1305,10 @@ def sls_id(id_, mods, test=None, queue=False, **kwargs):
errors += st_.state.verify_high(high_)
# Apply requisites to high data
high_, req_in_errors = st_.state.requisite_in(high_)
errors.extend(req_in_errors)
if req_in_errors:
# This if statement should not be necessary if there were no errors,
# but it is required to get the unit tests to pass.
errors.extend(req_in_errors)
if errors:
__context__['retcode'] = 1
return errors

View file

@ -132,6 +132,9 @@ class MockState(object):
data = data
return True
def requisite_in(self, data): # pylint: disable=unused-argument
return data, []
class HighState(object):
'''
Mock HighState class