[Fixed]-User created in migration does not exist

1👍

Tests always start with an empty database; it looks like your tasks.py is getting imported before the migration that creates the default user has had a chance to run.

However you should not be doing things like queries at module level, for precisely this reason. Move that line in tasks.py into a function and call it when it is needed.

Leave a comment