How to test Django API that uses Celery task with send_email?
So, in my Django
project, I have an API view
that sends data by email to the user.
That job doing by Cerely
(celery task).
I want to test that API sends the right data.
But I can't realize how to do that with that celery job, because the user created in a testcase has a non-exist email.
So even if I run celery worker in a test it'll fail due to the wrong email with SMTP error...
If we implement the view
without celery we can use Django mail.outbox[0].body
to inspect the mail.
But with Celery we can't.
Pls, advise.