django test app error - Got an error creating the test database: permission denied to create database

后端 未结 9 953
甜味超标
甜味超标 2020-12-22 16:53

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
         


        
9条回答
  •  不知归路
    2020-12-22 17:31

    A superuser account is the easiest way to guarantee smooth testing. so a simpler way of making the django user su is to do ALTER django WITH SUPERUSER .

    for more information https://www.postgresql.org/docs/current/sql-alteruser.html

提交回复
热议问题