def handle(self, *args, **options): jobs = Job().get_jobs_to_get_feedback() for job in jobs: send_feedback_collection_email(job) return "True"
def test_helper_send_feedback_collection_email(self, mocked_send_mail): from pyjobs.marketing.models import Contact, Messages self.feedback_email = Recipe(Messages, message_type="feedback").make() send_feedback_collection_email(self.job) self.assertTrue(mocked_send_mail.called)
def send_feedback_collection(modeladmin, request, queryset): for j in queryset: send_feedback_collection_email(j)