Opened 5 years ago

Closed 5 years ago

#31298 closed Bug (worksforme)

Integrity Error in running django tests with multiple instances of TestCase class

Reported by: Shaily Owned by:
Component: Error reporting Version: 2.2
Severity: Normal Keywords: Teardown fixtures IntegrityError
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The tests defined for the first TestCase execute successfully. However, for the next TestCase I get an integrity error indicating that the fixtures from the previous TestCase were not cleaned up after the test run. This happens only with Postgres. The same tests run successfully with SQLite. If I put these tests within the same class, they run successfully even with postgres.
Postgres version - 10.10

Attachments (1)

test_run.py (593 bytes ) - added by Shaily 5 years ago.
test_run.py

Download all attachments as: .zip

Change History (2)

by Shaily, 5 years ago

Attachment: test_run.py added

test_run.py

comment:1 by Shaily, 5 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top