コード例 #1
0
 def test_is_cooldown_over_true_2(self):
     c = CommandCall(user='******',
                     _value=CommandCall.COACH,
                     _datetime=pendulum.now().subtract(
                         seconds=CommandCall.COOLDOWN)).save()
     self.assertTrue(c.is_cooldown_over())
コード例 #2
0
 def test_is_cooldown_over_false(self):
     c = CommandCall(user='******',
                     _value=CommandCall.COACH,
                     _datetime=pendulum.now()).save()
     self.assertFalse(c.is_cooldown_over())
コード例 #3
0
 def test_is_cooldown_over_true(self):
     c = CommandCall(user='******',
                     _value=CommandCall.COACH,
                     _datetime=pendulum.yesterday()).save()
     self.assertTrue(c.is_cooldown_over())