I want to test celery task using pytest in Django. 
If I use celery_worker parameter in test function then I get an error:

{OperationalError}database table is locked (sqllite).

If I run worker before tests and do not use celery_worker parameter then task run seccesfully but I can't locate changes in the test database (pytestmark = pytest.mark.django_db) as all updates links to the original database.
I try to run the test in Docker (postgresql db) but with parameter celery_worker I get error:

psycopg2.InterfaceError: connection already closed
Need to use celery_worker parameter in pair with pytest mark @pytest.mark.django_db(transaction=True).
Pytest celery: cleaned up database after task call