Re: Problem with auto tests Get an error creating the test database: (1044, "Access denied for user 'viewbank_django'@'localhost' to database 'test_viewbank_django'")

245 views
Skip to first unread message

Ryan Blunden

unread,
Dec 29, 2012, 2:02:25 PM12/29/12
to django...@googlegroups.com
Hey Jeff,

There sure is. Just specify a "TEST_NAME" key in the database configuration dictionary and you're good to go.


Cheers,
Ryan

On 29/12/2012, at 7:27 AM, Jeff <je...@ccmail.co> wrote:

When I run the command - "python manage.py test polls" I get the following error - error creating the test database: (1044, "Access denied for user 'viewbank_django'@'localhost' to database 'test_viewbank_django'")

I am using a shared server that will only allow me to create a database prefixed with viewbank_.

Using the MYSQL client I can create viewbank_django_test or any variation I like as long as it starts with viewbank_.

Is there a way to change the way django names the test database?

Thanks in advance
Jeff

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/oxBvQnPWaJgJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Jeff

unread,
Dec 30, 2012, 5:51:32 PM12/30/12
to django...@googlegroups.com
Thanks Ryan,

That almost worked. The first run of the test script failed with the same error, but if I create the database from the mysql client in the server control panel, the script then asks if you want to delete the database and then continues and runs the tests.

Also the test database is not destroyed by the script when it finishes running.

So while not perfect it does seem to work ok.

Again thanks
Jeff
Reply all
Reply to author
Forward
0 new messages