It seems to be a django bug. I changed the apps order in INSTALED_APPS in settings.py and everything started to work correctly.
On 6 ago, 11:55, Thales <thales....@gmail.com> wrote: > Hi everybody, > > I am working in a project using django, which has about 20 apps's. > There is no tests written and It was decided that tests would have to > be written for the whole project. > > To start testing, I runned: > "python manage.py test" > > And a database was created, tables and stuff... But one table wasnt > created, so I got this error: > "Error: Database test_febrace couldn't be flushed. Possible reasons: > * The database isn't running or isn't configured correctly. > * At least one of the expected database tables doesn't exist. > * The SQL was invalid. > Hint: Look at the output of 'django-admin.py sqlflush'. That's the > SQL this command wasn't able to run. > The full error: (1146, "Table 'test_febrace.submissao_projeto' > doesn't exist")" > > Trying to discover what the problem was, I deleted all my tables and > runned: > "python manage.py syncdb" > And... 2 of the tables weren't created in my mysql database. Both of > them are from the same app, which has other models and the other > models tables were succesfully created. > > I tryed > "python manage.py sqlall *appname*" and I executed the returned sql > statements in my mysql server, so the tables were created. > > Any suggestion? For the project, it is ok to create manually executing > the sqlall commands for me, but this way I cant test. > > Thank you! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.