Mixins for test cases that need to test enabled extensions.
Unit tests mixin for more easily testing extensions.
This will do the hard work of creating the fake registration information needed for an extension and to instantiate an instance for testing.
Projects may want to provide their own subclass for their extensions to use that implements
get_extension_manager(), so extensions won’t have to.
The extension manager owning the extension. Tests can use this to manually enable/disable the extension, if needed.
The extension class to test.
Optional metadata to use for the extension information.
Optional package name to use for the extension information.
Return the extension manager used for the tests.
Subclasses may want to override this to pick a specific extension manager, if the project uses more than one. The default behavior is to return the first registered extension manager.
Returns: The extension manager used for tests. Return type: djblets.extensions.manager.ExtensionManager