Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use TransactionTestCase without wagtailsearchpromotions app on PostgreSQL #2810

Closed
wants to merge 1 commit into from

Conversation

ychab
Copy link
Contributor

@ychab ychab commented Jul 1, 2016

Hi,

I made a PR just to easily let's you reproduce the bug because I cannot fix it yet. In that way, you just have to execute the test (don't forgot to have a postgreSQL database test ready, I temporary force the test settings to use it instead of using environment variables). Then with :

./runtests.py wagtail.wagtailsearch.tests.test_migrations

PostgreSQL should throw the following exception for the transaction test case :

psycopg2.NotSupportedError: cannot truncate a table referenced in a foreign key constraint

To summarize, if we use postgreSQL, don't have wagtailsearchpromotions app enabled and want to do some TransactionTestCase in our project, we can't.

Obviously, the migration 0003 remove the EditorsPick's table model which is still use by wagtailsearchpromotions ?

I can't still figure out why TestCase works fine and TransactionTestCase don't...?

Thanks

@gasman
Copy link
Collaborator

gasman commented Jul 1, 2016

This sounds like a duplicate of (or at least related to) #1824.

@ychab
Copy link
Contributor Author

ychab commented Jul 4, 2016

Exactly! I close this issue because it's a duplicate.

@ychab ychab closed this Jul 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants