First time here? Check out the FAQ!
0

Why are my tests not working?

I'm testing Askbot on my local machine:

$ python manage.py test
Creating test database for alias 'default'...
Got an error creating the test database: database "test_spirituality_db" already exists

Type 'yes' if you would like to try deleting the test database 'test_spirituality_db', or 'no' to cancel: yes
Destroying old test database 'default'...
adding new badge Disciplined
adding new badge Peer Pressure
adding new badge Nice answer
adding new badge Nice Question
adding new badge Pundit
adding new badge Popular Question
adding new badge Citizen patrol
adding new badge Cleanup
adding new badge Critic
adding new badge Editor
adding new badge Organizer
adding new badge Scholar
adding new badge Student
adding new badge Supporter
adding new badge Teacher
adding new badge Autobiographer
adding new badge Self-Learner
adding new badge Great Answer
adding new badge Great Question
adding new badge Stellar Question
adding new badge Famous question
adding new badge Alpha
adding new badge Good Answer
adding new badge Good Question
adding new badge Favorite Question
adding new badge Civic duty
adding new badge Strunk & White
adding new badge Generalist
adding new badge Expert
adding new badge Yearling
adding new badge Notable Question
adding new badge Enlightened
adding new badge Beta
adding new badge Guru
adding new badge Necromancer
adding new badge Taxonomist


Adding subscription on comment responses and name mentions for each user.
frequency will be automatically set to the most frequent selection
that user made for any other types of subscriptions

probably already have column User.response_count
Migrating users to new avatar field
Converting question to threads:
Deleting unused tags added for internal bookkeeping...
None found
........F.FF.F..EEE...EE.EF.....EE.....................EEEEEEE..E.EEEEEEEEEEEE......................F.........................................................sE...........................................F.......EEEEEEEEEEEEEEEEEEEEEE..........E.EEEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE....EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE..EEEEEEEEEEEEEE...EXPECTED BODY
Welcome to askbot.com!

Important: Please reply to this message, without editing it. We need this to determine your email signature and that the email address is valid and was typed correctly.

Until we receive the response from you, you will not be able ask or answer questions on askbot.com by email.

Sincerely,askbot.com Administrator

DwFwndQty

Welcome to askbot.com!

Important: Please reply to this message, without editing it. We need this to determine your email signature and that the email address is valid and was typed correctly.

Until we receive the response from you, you will not be able ask or answer questions on askbot.com by email.

Sincerely,askbot.com Administrator
DwFwndQty

CLEANED BODY
FE===============================
message : some text

Today someone wrote:
==== john did something reply above this line -=-==
blah blah
guercms5rxbt
Yours Truly
...EEEEEEEEEEE..EEEEEEEE.F..EEEEEEEEE.ssssEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EE..EEEEEEEEEEError: Database test_spirituality_db 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: relation "countries_test_person" does not exist

Bryan@Bryans-MacBook-Pro Wed Nov 14 12:51 ... (more)

mrB's avatar
51
mrB
asked 2012-11-14 12:01:31 -0600
Evgeny's avatar
13.2k
Evgeny
updated 2012-11-14 12:10:11 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

Do the full sync and migrate on the production database before running tests, even though the production database is not used for the testing, I think I saw this issue before.

Also - you might want to run tests with explicit app names, as python manage.py test will run all the django tests as well as tests for all the other apps, which might take a lot of time.

Evgeny's avatar
13.2k
Evgeny
answered 2012-11-14 12:09:23 -0600
edit flag offensive 0 remove flag delete link

Comments

Running python manage.py test askbot generated much few errors.

mrB's avatar mrB (2012-11-14 13:18:53 -0600) edit
add a comment see more comments
0

I have the same problem when I run python manage.py test, did anyone manage to solve this problem ?

Léo LEFEBVRE's avatar
1
Léo LEFEBVRE
answered 2013-04-26 08:38:17 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments