Skip to content

OpenEdxEventsTestMixin interferes with other test cases #497

@bradenmacdonald

Description

@bradenmacdonald

If one test class in a given test run uses OpenEdxEventsTestMixin, and other tests in the same test run use events but do not use OpenEdxEventsTestMixin, then the other tests will sometimes fail in a flaky fashion, depending on the order that the tests are run.

This is because OpenEdxEventsTestMixin disables all signals, then enables the subset ENABLED_OPENEDX_EVENTS, then runs the tests - but it does not clean up. It should have a clean up handler like this:

    @classmethod
    def tearDownClass(cls):
        """ Don't let our event isolation affect other test cases """
        super().tearDownClass()
        cls.enable_all_events()

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions