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

ContentTypes cache not cleared between tests #1156

Open
tomviner opened this issue Oct 15, 2024 · 0 comments
Open

ContentTypes cache not cleared between tests #1156

tomviner opened this issue Oct 15, 2024 · 0 comments

Comments

@tomviner
Copy link
Contributor

We've been testing our query counts, and found our tests weren't independent due to the caching of ContentTypes causing query counts to depend on test ordering.

There's a handy pytest-django fixture for clearing the Sites cache but not one for ContentTypes.

Is this something that would be accepted as an addition to this library? It would call ContentType.objects.clear_cache()

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

No branches or pull requests

1 participant