I can only run my backend tests locally because all the instances of the mocked environment are created and into the actual db because of celery

I want to create tests but every time I run a test it triggers celery and celery creates instances into my local db. that means that if I run those tests in the prod or dev servers, then it will create rubish there. maybe that will trigger other stuff and create problems into the db. how can I avoid all of that? how can I mock celery so it doesn't create troubles in the dev server or prod server while running tests?

I tried some mocking throuth the @override_settings but it didn't work actually as I would like

Вернуться на верх