3

I created a unit test on Django to create a user account and send a verification e-mail. The user is created, but the e-mail fails to send. The e-mail's default contents are supposed to be created as a field in the user when a user is created, but for some reason, Django is claiming -

DatabaseError: no such column: app_userprofile.default_email_header

It works fine when the account is created manually, though for some reason it fails to create that column in the database when done from a unit test. Any suggestions for fixing this?

Note: South was used to migrate changes in models.py - could that be the problem?

SImon
  • 839
  • 2
  • 10
  • 13
  • 3
    Unless you have this setting in place: SOUTH_TESTS_MIGRATE = False, your South migrations will run every time you run your tests. If you do not have that setting, you could try it and see if you get any different results (in which case you likely have a problem somewhere in your migrations), otherwise it would help to see your model code pasted here. – Chris Forrette Jul 16 '12 at 20:09
  • That fixed everything - thank you so much – SImon Jul 18 '12 at 13:26

0 Answers0