Skip to content

Commit

Permalink
Add missing mocks needed for Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmatthews committed Mar 8, 2017
1 parent 5a11133 commit d7a872b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion COT/helpers/tests/test_isoinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_get_version(self, _):
"""))
def test_call_cache(self, mock_check_output):
"""ISO information is cached and replayed appropriately."""
self.helper._installed = True
args = ('-i', self.input_iso, '-l')
output = self.helper.call(args)
# Output should be stored in the cache
Expand All @@ -77,8 +78,10 @@ def test_call_cache(self, mock_check_output):
self.assertEqual(output3, "Gotcha!")
mock_check_output.assert_called_once()

def test_call_noop_nocache(self):
@mock.patch('COT.helpers.helper.check_output', return_value="")
def test_call_noop_nocache(self, _):
"""Not all calls are cached."""
# Call is a no-op but succeeds. Nothing to cache
self.helper._installed = True
self.helper.call(['-i', self.input_iso])
self.assertDictEqual(self.helper.cached_output, {})

0 comments on commit d7a872b

Please sign in to comment.