Skip to content

ContentTypes cache not cleared between tests #1156

Open
@tomviner

Description

@tomviner

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions