def test_no_counter(self): """Test counter method with no counter set.""" xknx = XKNX(loop=self.loop) action = ActionBase(xknx, counter=None) self.assertTrue(action.test_counter(None)) self.assertTrue(action.test_counter(1)) self.assertTrue(action.test_counter(2)) self.assertTrue(action.test_counter(3))
def test_no_counter(self): """Test counter method with no counter set.""" xknx = XKNX(loop=self.loop) action = ActionBase(xknx, counter=None) self.assertTrue(action.test_counter(None)) self.assertTrue(action.test_counter(1)) self.assertTrue(action.test_counter(2)) self.assertTrue(action.test_counter(3))
def test_counter(self): """Test counter method.""" xknx = XKNX(loop=self.loop) action = ActionBase(xknx, counter=2) self.assertTrue(action.test_counter(None)) self.assertFalse(action.test_counter(1)) self.assertTrue(action.test_counter(2)) self.assertFalse(action.test_counter(3))
def test_counter(self): """Test counter method.""" xknx = XKNX(loop=self.loop) action = ActionBase(xknx, counter=2) self.assertTrue(action.test_counter(None)) self.assertFalse(action.test_counter(1)) self.assertTrue(action.test_counter(2)) self.assertFalse(action.test_counter(3))