When I try to test any app with command (I noticed it when I tried to deploy myproject using fabric, which uses this command):
python manage.py test appname
In the case of Postgres, the user must have createdb permission.
createdb
ALTER ROLE miriam CREATEDB;
See this documentation: https://docs.djangoproject.com/en/2.0/topics/testing/overview/#the-test-database