def test_stop(self):
    mock_instance1 = mock.Mock()
    mock_instance2 = mock.Mock()
    self.c._instances = {'i1': mock_instance1, 'i2': mock_instance2}
    self.c.stop('i1')
    mock_instance1.stop.assert_called_once_with()
    mock_instance2.stop.assert_not_called()
    mock_instance1.reset_mock()
    self.c.stop()
    mock_instance1.stop.assert_called_once_with()
    mock_instance2.stop.assert_called_once_with()
def test_stop(self):
    mock_instance1 = mock.Mock()
    mock_instance2 = mock.Mock()
    self.c._instances = {'i1': mock_instance1, 'i2': mock_instance2}
    self.c.stop('i1')
    mock_instance1.stop.assert_called_once_with()
    mock_instance2.stop.assert_not_called()
    mock_instance1.reset_mock()
    self.c.stop()
    mock_instance1.stop.assert_called_once_with()
    mock_instance2.stop.assert_called_once_with()