This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Django 3.0 compat: Avoid pickle of local object
If the FireSimpleEvent class is defined in the function, then an error is raised: AttributeError: Can't pickle local object 'EventUnionTests.test_fire.<locals>.FireSimpleEvent' Pickling works when the class is defined at the module level, but the object attribute .called is set on the deserialized copy, not the original. Refactor the test class to work on a global variable instead.
- Loading branch information