First time here? Check out the FAQ!

Revision history  [back]

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:27 ~/work/askbot-discussion/askbotSpirit
$ python manage.py sqlflush
BEGIN;
TRUNCATE "auth_permission", "auth_group", "askbot_replyaddress", "djcelery_workerstate", "auth_user_user_permissions", "djkombu_message", "vote", "tag", "askbot_post_groups", "askbot_draftanswer", "django_site", "djcelery_periodictasks", "djcelery_intervalschedule", "askbot_thread_tags", "askbot_askwidget", "django_content_type", "askbot_groupmembership", "followit_followuser", "django_session", "auth_user_groups", "django_authopenid_association", "djcelery_periodictask", "celery_taskmeta", "django_authopenid_nonce", "django_authopenid_userassociation", "askbot_group", "askbot_postrevision", "askbot_anonymousanswer", "repute", "djcelery_taskstate", "askbot_activityauditstatus", "robots_rule_sites", "askbot_thread", "django_admin_log", "askbot_markedtag", "askbot_questionwidget", "auth_group_permissions", "askbot_post", "celery_tasksetmeta", "askbot_thread_groups", "askbot_badgedata", "award", "askbot_thread_followed_by", "django_authopenid_userpasswordqueue", "askbot_postflagreason", "livesettings_longsetting", "askbot_questionview", "djcelery_crontabschedule", "south_migrationhistory", "robots_rule_disallowed", "askbot_draftquestion", "djkombu_queue", "askbot_anonymousquestion", "askbot_emailfeedsetting", "robots_rule", "tag_suggested_by", "livesettings_setting", "auth_message", "activity_receiving_users", "robots_rule_allowed", "activity", "auth_user", "favorite_question", "robots_url";
SELECT setval(pg_get_serial_sequence('"auth_permission"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"auth_group"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"auth_user"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"auth_message"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_content_type"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_site"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_admin_log"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_nonce"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_association"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_userassociation"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_userpasswordqueue"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"south_migrationhistory"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"livesettings_setting"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"livesettings_longsetting"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"robots_url"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"robots_rule"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"celery_taskmeta"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"celery_tasksetmeta"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_intervalschedule"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_crontabschedule"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_periodictask"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_workerstate"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_taskstate"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djkombu_queue"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djkombu_message"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"followit_followuser"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"vote"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_badgedata"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"award"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"repute"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"tag"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_markedtag"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_activityauditstatus"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"activity"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_emailfeedsetting"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_post_groups"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_post"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_postrevision"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_postflagreason"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_draftanswer"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_anonymousanswer"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_thread_groups"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_thread"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_questionview"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"favorite_question"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_draftquestion"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_anonymousquestion"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_replyaddress"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_askwidget"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_questionwidget"','id'), 1, false);
COMMIT;

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:27 ~/work/askbot-discussion/askbotSpirit
$ python manage.py sqlflush
BEGIN;
TRUNCATE "auth_permission", "auth_group", "askbot_replyaddress", "djcelery_workerstate", "auth_user_user_permissions", "djkombu_message", "vote", "tag", "askbot_post_groups", "askbot_draftanswer", "django_site", "djcelery_periodictasks", "djcelery_intervalschedule", "askbot_thread_tags", "askbot_askwidget", "django_content_type", "askbot_groupmembership", "followit_followuser", "django_session", "auth_user_groups", "django_authopenid_association", "djcelery_periodictask", "celery_taskmeta", "django_authopenid_nonce", "django_authopenid_userassociation", "askbot_group", "askbot_postrevision", "askbot_anonymousanswer", "repute", "djcelery_taskstate", "askbot_activityauditstatus", "robots_rule_sites", "askbot_thread", "django_admin_log", "askbot_markedtag", "askbot_questionwidget", "auth_group_permissions", "askbot_post", "celery_tasksetmeta", "askbot_thread_groups", "askbot_badgedata", "award", "askbot_thread_followed_by", "django_authopenid_userpasswordqueue", "askbot_postflagreason", "livesettings_longsetting", "askbot_questionview", "djcelery_crontabschedule", "south_migrationhistory", "robots_rule_disallowed", "askbot_draftquestion", "djkombu_queue", "askbot_anonymousquestion", "askbot_emailfeedsetting", "robots_rule", "tag_suggested_by", "livesettings_setting", "auth_message", "activity_receiving_users", "robots_rule_allowed", "activity", "auth_user", "favorite_question", "robots_url";
SELECT setval(pg_get_serial_sequence('"auth_permission"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"auth_group"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"auth_user"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"auth_message"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_content_type"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_site"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_admin_log"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_nonce"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_association"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_userassociation"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"django_authopenid_userpasswordqueue"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"south_migrationhistory"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"livesettings_setting"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"livesettings_longsetting"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"robots_url"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"robots_rule"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"celery_taskmeta"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"celery_tasksetmeta"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_intervalschedule"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_crontabschedule"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_periodictask"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_workerstate"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djcelery_taskstate"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djkombu_queue"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"djkombu_message"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"followit_followuser"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"vote"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_badgedata"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"award"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"repute"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"tag"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_markedtag"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_activityauditstatus"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"activity"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_emailfeedsetting"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_post_groups"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_post"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_postrevision"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_postflagreason"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_draftanswer"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_anonymousanswer"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_thread_groups"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_thread"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_questionview"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"favorite_question"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_draftquestion"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_anonymousquestion"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_replyaddress"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_askwidget"','id'), 1, false);
SELECT setval(pg_get_serial_sequence('"askbot_questionwidget"','id'), 1, false);
COMMIT;