@pytest.mark.django_db(transaction=True)
def test_example():
    obj_ = Model()
obj_.save()
p = multiprocessing.Process(target=function_to_run)
p.start()
Django: using same test database in a separate thread