Refactor extension tests to use less Mock()
Review Request #7909 — Created Jan. 25, 2016 and submitted
The extension tests now use a
ExtensionManagersubclass that provides
the entry points (which are faked via new utility classes,
FakeEntryPoint, which mocks the entry point, andFakeDistribution,
which mocks the distribution metadata) at initialization time. This
allows futher tests of extension managers to be more succinct and
robust.
Ran unit tests.
| Description | From | Last Updated |
|---|---|---|
|
Docstring? |
|
- Description:
-
The extension tests now use a
ExtensionManagersubclass that providesthe entry points (which are faked via new utility classes, ~ FakeEntryPoint, which mocks the entry point, andFakeDistribution`,~ FakeEntryPoint, which mocks the entry point, andFakeDistribution,which mocks the distribution metadata) at initialization time. This allows futher tests of extension managers to be more succinct and robust. - Diff:
-
Revision 2 (+212 -165)
Tool: Pyflakes Processed Files: djblets/extensions/tests.py Tool: PEP8 Style Checker Processed Files: djblets/extensions/tests.py