From d7a872b94add55d2325187f48232e62df6dd78aa Mon Sep 17 00:00:00 2001 From: Glenn Matthews Date: Wed, 8 Mar 2017 14:03:46 -0500 Subject: [PATCH] Add missing mocks needed for Travis --- COT/helpers/tests/test_isoinfo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/COT/helpers/tests/test_isoinfo.py b/COT/helpers/tests/test_isoinfo.py index 66a7d3b..80d677f 100644 --- a/COT/helpers/tests/test_isoinfo.py +++ b/COT/helpers/tests/test_isoinfo.py @@ -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 @@ -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, {})