from km3pipe.testing import TestCase, patch, Mock
from km3pipe.io.ch import CHPump

__author__ = "Tamas Gal"
__copyright__ = "Copyright 2018, Tamas Gal and the KM3NeT collaboration."
__credits__ = []
__license__ = "MIT"
__maintainer__ = "Tamas Gal"
__email__ = "tgal@km3net.de"
__status__ = "Development"


class TestCHPump(TestCase):
    def test_init(self):
        pass

from km3pipe.testing import TestCase, patch, Mock
from km3pipe.io.ch import CHPump

__author__ = "Tamas Gal"
__copyright__ = "Copyright 2018, Tamas Gal and the KM3NeT collaboration."
__credits__ = []
__license__ = "MIT"
__maintainer__ = "Tamas Gal"
__email__ = "tgal@km3net.de"
__status__ = "Development"


class TestCHPump(TestCase):
    @patch("km3pipe.io.ch.CHPump._init_controlhost")
    @patch("km3pipe.io.ch.CHPump._start_thread")
    def test_init(self, init_controlhost_mock, start_thread_mock):
        CHPump()
        init_controlhost_mock.assert_called_once()
        start_thread_mock.assert_called_once()

Add a test for CHPump
Add a test for CHPump

  from km3pipe.testing import TestCase, patch, Mock
  from km3pipe.io.ch import CHPump
  
  __author__ = "Tamas Gal"
  __copyright__ = "Copyright 2018, Tamas Gal and the KM3NeT collaboration."
  __credits__ = []
  __license__ = "MIT"
  __maintainer__ = "Tamas Gal"
  __email__ = "tgal@km3net.de"
  __status__ = "Development"
  
  
  class TestCHPump(TestCase):
-     def test_init(self):
-         pass
+     @patch("km3pipe.io.ch.CHPump._init_controlhost")
+     @patch("km3pipe.io.ch.CHPump._start_thread")
+     def test_init(self, init_controlhost_mock, start_thread_mock):
+         CHPump()
+         init_controlhost_mock.assert_called_once()
+         start_thread_mock.assert_called_once()
  
Add a test for CHPump
## Code Before:
from km3pipe.testing import TestCase, patch, Mock
from km3pipe.io.ch import CHPump

__author__ = "Tamas Gal"
__copyright__ = "Copyright 2018, Tamas Gal and the KM3NeT collaboration."
__credits__ = []
__license__ = "MIT"
__maintainer__ = "Tamas Gal"
__email__ = "tgal@km3net.de"
__status__ = "Development"


class TestCHPump(TestCase):
    def test_init(self):
        pass

## Instruction:
Add a test for CHPump
## Code After:
from km3pipe.testing import TestCase, patch, Mock
from km3pipe.io.ch import CHPump

__author__ = "Tamas Gal"
__copyright__ = "Copyright 2018, Tamas Gal and the KM3NeT collaboration."
__credits__ = []
__license__ = "MIT"
__maintainer__ = "Tamas Gal"
__email__ = "tgal@km3net.de"
__status__ = "Development"


class TestCHPump(TestCase):
    @patch("km3pipe.io.ch.CHPump._init_controlhost")
    @patch("km3pipe.io.ch.CHPump._start_thread")
    def test_init(self, init_controlhost_mock, start_thread_mock):
        CHPump()
        init_controlhost_mock.assert_called_once()
        start_thread_mock.assert_called_once()
