Django unable to load test fixtures, IntegrityError

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • JetBrains - Developer Ecosystem Survey 2022
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
  • saleor

    A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React. [Moved to:] (by mirumee)

    I'm using Saleor/Satchless to power and e-commerce site (inherited the project). I couldn't find a Saleor mailing list so posting here instead.

  • django-fixture-magic

    Utilities to extract and manipulate Django Fixtures.

    ======================================================================ERROR: test__hometryon_extra_pair_sizes (payment.tests.InterstitialTestCase)----------------------------------------------------------------------Traceback (most recent call last): File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/test/", line 259, in __call__self._pre_setup() File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/test/", line 479, in _pre_setupself._fixture_setup() File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/test/", line 849, in _fixture_setup'skip\_validation': True, File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/core/management/\_\_init\_\", line 161, in call_commandreturn klass.execute(*args, **defaults) File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/core/management/", line 255, in executeoutput = self.handle(*args, **options) File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/core/management/commands/", line 224, in handleconnection.check_constraints(table_names=table_names) File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/db/backends/postgresql\_psycopg2/", line 132, in check_constraintsself.cursor().execute('SET CONSTRAINTS ALL IMMEDIATE') File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/db/backends/postgresql\_psycopg2/", line 56, in executesix.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2]) File "/Users/andres/.virtualenvs/rpmwest/lib/python2.7/site-packages/django/db/backends/postgresql\_psycopg2/", line 54, in executereturn self.cursor.execute(query, args)IntegrityError: Problem installing fixtures: insert or update on table "product\_ship" violates foreign key constraint "product\_ship\_product\_ptr\_id\_fkey"DETAIL: Key (product_ptr_id)=(1) is not present in table "product\_product". Update: Started playing around with django-fixture-magic I discovered that product.product is not actually being dumped even when I do a $ python dumpdata --indent=4 --all -e contenttypes -e sessions -e south > fulldb.json

  • JetBrains

    Developer Ecosystem Survey 2022. Take part in the Developer Ecosystem Survey 2022 by JetBrains and get a chance to win a Macbook, a Nvidia graphics card, or other prizes. We’ll create an infographic full of stats, and you’ll get personalized results so you can compare yourself with other developers.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts