Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#8249 closed (invalid)

Regression of ticket #6820 (at least when using with GeoDjango)

Reported by: eugene.pervago@… Owned by: nobody
Component: Testing framework Version: master
Severity: Keywords: gis geodjango tests flush introspection regression
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


It seems that the recent refactoring of introspection (changeset:8296) may have
introduced a regression of ticket:6820.

When running tests of an application that uses GeoDjango, all tables are created
correctly and fixtures manage to load without a problem. But the flush fails with the
following message:

Error: Database test_epervago_django 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 ' sqlflush'. That's the SQL this command wasn't able to run.
    The full error:   insert or update on table "maps_userprofile" violates foreign key constraint "maps_userprofile_user_id_fkey"
DETAIL:  Key (user_id)=(1) is not present in table "auth_user".

This is the output of sqlflush:

TRUNCATE "auth_permission", "auth_group", "auth_user_user_permissions", "django_site", 
"books_book", "django_content_type", "maps_district", "django_session", "auth_user_groups", 
"maps_area", "maps_city", "maps_listing", "maps_state", "books_book_tags", "django_admin_log", 
"maps_userprofile", "auth_group_permissions", "maps_userprofile_saved_listings", "maps_address", 
"books_author", "books_publisher", "maps_area_districts", "auth_message", "books_tag", "auth_user";

Attachments (1) (3.9 KB) - added by eugene.pervago@… 10 years ago.
Test runner used

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by Jacob

milestone: 1.0
Triage Stage: UnreviewedAccepted

I'm not at all sure this is gis-related.

Changed 10 years ago by eugene.pervago@…

Attachment: added

Test runner used

comment:2 Changed 10 years ago by eugene.pervago@…

Resolution: invalid
Status: newclosed

Nevermind. There was a foreign key violation in the fixture, just three lines at the end of a
several-hundred-line file. Sorry for the noise.

comment:3 Changed 7 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top