Flaky Circle CI tests (django): ImportError: cannot import name "task" from "app.tasks" (unknown location)

Sometimes, I have many flaky test failures due to one error:

ImportError: cannot import name 'task_import_events_to_db' from 'app.tasks' (unknown location)

It seems the tests fail because of this import error. Meanwhile, other branches pass without issues, and tests also pass normally after merging. App is in INSTALLED APPS, locally everything works. But not on circle ci

Stack: Django, PostgreSQL, Redis Circle ci error

Many flaky tests due to import error.

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