Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t在Python/Django应用程序上运行测试_Python_Django - Fatal编程技术网

Can';t在Python/Django应用程序上运行测试

Can';t在Python/Django应用程序上运行测试,python,django,Python,Django,我已经授予用户“CREATEDB” 但是当我使用python manage.py test运行测试时 我犯了这个错误 Creating test database for alias 'default'... Got an error creating the test database: permission denied to create database 这是我的设置.py DATABASES = { 'default': { 'ENGINE': 'django

我已经授予用户“CREATEDB”

但是当我使用
python manage.py test运行测试时

我犯了这个错误

Creating test database for alias 'default'... Got an error creating
the test database: permission denied to create database
这是我的设置.py

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'my_db',
        'USER': 'my_admin',
        'PASSWORD': '',
        'HOST': 'localhost',
        'PORT': '',
        'TEST' : {
            'NAME': 'test_my_db'
        }
    } }

我们可能需要知道的事情:1)什么后端?2) 您给数据库用户的授权是什么?3) 它能否连接到默认数据库(即,这里是否存在密码问题)?您想要什么?posible dublicate[python manage.py migrate工作吗?