เมื่อฉันพยายามทดสอบแอพใด ๆ ด้วยคำสั่ง (ฉันสังเกตว่าเมื่อฉันพยายามปรับใช้ myproject โดยใช้แฟบริคซึ่งใช้คำสั่งนี้):
python manage.py test appnameฉันได้รับข้อผิดพลาดนี้:
Creating test database for alias 'default'...
Got an error creating the test database: permission denied to create database
Type 'yes' if you would like to try deleting the test database 'test_finance', or 'no' to cancelsyncdbคำสั่งดูเหมือนว่าจะทำงาน การตั้งค่าฐานข้อมูลของฉันใน settings.py:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'finance',                      # Or path to database file if using sqlite3.
        'USER': 'django',                      # Not used with sqlite3.
        'PASSWORD': 'mydb123',                  # Not used with sqlite3.
        'HOST': '127.0.0.1',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}