diff --git a/tox.ini b/tox.ini index bf7073a..6bb0ef9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 1.8 skipsdist = True -envlist = py34,py27,pep8 +envlist = py35,py34,py27,pep8 [testenv] usedevelop = True diff --git a/virtualbmc/exception.py b/virtualbmc/exception.py index 8abc29c..1c52fde 100644 --- a/virtualbmc/exception.py +++ b/virtualbmc/exception.py @@ -12,6 +12,7 @@ class VirtualBMCError(Exception): + message = None def __init__(self, message=None, **kwargs): if self.message and kwargs: diff --git a/virtualbmc/tests/unit/test_manager.py b/virtualbmc/tests/unit/test_manager.py index 1aa32bb..961fc11 100644 --- a/virtualbmc/tests/unit/test_manager.py +++ b/virtualbmc/tests/unit/test_manager.py @@ -86,7 +86,7 @@ class VirtualBMCManagerTestCase(base.TestCase): def _test__show(self, mock__parse, mock_pid, mock_open, expected=None): mock_pid.return_value = True mock__parse.return_value = self.domain0 - f = mock.MagicMock(spec=file) + f = mock.MagicMock() f.read.return_value = self.domain0['port'] mock_open.return_value.__enter__.return_value = f @@ -212,7 +212,7 @@ class VirtualBMCManagerTestCase(base.TestCase): @mock.patch.object(os.path, 'exists') def test_stop(self, mock_exists, mock_remove, mock_kill, mock_open): mock_exists.return_value = True - f = mock.MagicMock(spec=file) + f = mock.MagicMock() f.read.return_value = self.domain0['port'] mock_open.return_value.__enter__.return_value = f @@ -234,7 +234,7 @@ class VirtualBMCManagerTestCase(base.TestCase): @mock.patch.object(os.path, 'exists') def test_stop_pid_file_not_found(self, mock_exists, mock_open): mock_exists.return_value = True - f = mock.MagicMock(spec=file) + f = mock.MagicMock() f.read.return_value = self.domain0['port'] mock_open.return_value.__enter__.side_effect = IOError('boom')