def test_exceptions(self): """Test there are no default implementations in ManagedInstance Doesn't do much but get us test coverage. """ self.assertRaises(NotImplementedError, lambda: ManagedInstance('foo1')) with mock.patch.multiple(ManagedInstance, _start_process=mock.DEFAULT, _start_log_watcher=mock.DEFAULT) as mocks: instance = ManagedInstance('foo2') instance._process = mock.MagicMock() self.assertRaises(NotImplementedError, lambda: instance.flush()) open(instance.logfile, 'w').write('ohai') # so can delete instance.terminate()