bwareham the error happens because your DB user doesn't have the permissions necessary to create a new database in the DB server.
You can work around this by creating your test DB in advance via your Opalstack dashboard and then specifying the test DB info in your project settings, eg:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'your_database_name',
'USER': 'your_database_user_name',
'PASSWORD': 'your_database_user_password',
'HOST': '',
'PORT': '',
'TEST': {
'NAME': 'your_test_database_name',
'USER': 'your_test_database_user_name',
'PASSWORD': 'your_test_database_user_password',
},
}
}
Once that's done you can run your tests with the keepdb
option eg:
python manage.py test --keepdb myapp