Refactor the DummyAvatarService into two services
Review Request #8526 — Created Nov. 7, 2016 and submitted
The
DummyAvatarService
no longer does magic to set whether or not it
should provide high DPI avatars. Instead, we now have the
DummyHighDPIAvatarService
to provide that (and the
DummyAvatarService
will not provide high DPI avatars).
Ran unit tests.
- Summary:
-
Make the dummy avatar service callableRefactor the DummyAvatarService into two services
- Description:
-
~ The dummy avatar service is now callable like the dummy settings
~ mangaer, which allows us to partially instantiate it during __init__
~ and finish instantiation in __call__
. This allows us to set whether~ or not we want to use high DPI avatars before the avatar service is ~ The
DummyAvatarService
no longer does magic to set whether or not it~ should provide high DPI avatars. Instead, we now havw the ~ DummyHighDPIAvatarService
to provide that (and the~ DummyAvatarService
will not provide high DPI avatars).- fully instantiated with the settings manager (which we otherwise could - not do). - Diff:
-
Revision 2 (+63 -47)
-
Tool: Pyflakes Processed Files: djblets/avatars/tests.py Tool: PEP8 Style Checker Processed Files: djblets/avatars/tests.py
- Description:
-
The
DummyAvatarService
no longer does magic to set whether or not it~ should provide high DPI avatars. Instead, we now havw the ~ should provide high DPI avatars. Instead, we now have the DummyHighDPIAvatarService
to provide that (and theDummyAvatarService
will not provide high DPI avatars).