[Answered ]-Upgrade to Django 1.8.13. Tests fail but app works. Postgresql tables duplicated

1👍

Let’s take another look at your error, particularly this bit:

   Creating table blog_newslettersubscription
    Running deferred SQL...
Traceback (most recent call last):
  File "/home/user/workspace/project/lib/python3.4/site-packages/django/db/backends/utils.py", line 62, in execute
    return self.cursor.execute(sql)
psycopg2.ProgrammingError: relation "app_user" does not exist.

This says, your blog app refers to table in your app thus app should precede blog in your settings.py

Modify your INSTALLED_APPS as follows

INSTALLED_APPS = (
   'grappelli',
   ...
   'transmeta',
   'app','blog')
👤e4c5

1👍

It seems like ‘app’ is missing from your INSTALLED_APPS, so the table doesn’t get created when the test database is initialized.

Leave a comment