def send_mail_flex_horeca(pk): try: signal = Signal.objects.get(pk=pk) except Signal.DoesNotExist: return else: if is_signal_applicable(signal): mail.send_mail(signal)
def test_is_signal_applicable_in_category_on_sunday_after_end_time(self): result = utils.is_signal_applicable(self.signal) self.assertEqual(result, False)
def test_is_signal_applicable_outside_category_on_friday(self): result = utils.is_signal_applicable(self.signal_other_category) self.assertEqual(result, False)
def test_is_signal_applicable_in_category_on_friday(self): result = utils.is_signal_applicable(self.signal) self.assertEqual(result, True)