Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 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:

Description

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 'django-admin.py 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 django-admin.py 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)

gistest.py (3.9 KB) - added by eugene.pervago@… 6 years ago.
Test runner used

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by jacob

  • milestone set to 1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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

Changed 6 years ago by eugene.pervago@…

Test runner used

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

  • Resolution set to invalid
  • Status changed from new to closed

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 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.