@patch('time.sleep', fake_sleep)
def test_waterlevel_increase_decrease(self):
    w = Watertank(1000, [100, 100], [100], 0.5)
    w.autoupdater_start(1)
    initial_level = self._get_state(w)['water']
    i = 0
    while (i < 15):
        time.sleep(0.5)
        i += 1
    other_level = self._get_state(w)['water']
    self.assertGreater(other_level, initial_level)
    w.set_outputs([400])
    i = 0
    while (i < 15):
        time.sleep(0.5)
        i += 1
    dec_level = self._get_state(w)['water']
    self.assertGreater(other_level, dec_level)
@patch('time.sleep', fake_sleep)
def test_waterlevel_increase_decrease(self):
    w = Watertank(1000, [100, 100], [100], 0.5)
    w.autoupdater_start(1)
    initial_level = self._get_state(w)['water']
    i = 0
    while (i < 15):
        time.sleep(0.5)
        i += 1
    other_level = self._get_state(w)['water']
    self.assertGreater(other_level, initial_level)
    w.set_outputs([400])
    i = 0
    while (i < 15):
        time.sleep(0.5)
        i += 1
    dec_level = self._get_state(w)['water']
    self.assertGreater(other_level, dec_level)