Revamp avatar service registry API
Review Request #8479 — Created Oct. 20, 2016 and submitted — Latest diff uploaded
AvatarService
s now require anAvatarSettingsManager
class when
being instantiated. Previously, this was an optional argument that
defaulted to the defaultAvatarSettingsManager
which throws
NotImplementedError
for all its methods. However, registries were not
guaranteed to return any third party avatar services instantiated with
the correct settings manager.This has been corrected by making the avatar services registry always
store instances instead. It has simplified the API as now most things
can be done via method calls with theAvatarService
class as an
argument instead of itsavatar_service_id
attribute. It also has the
benefit of making unit tests more succinct.The
AvatarServicesRegistry
'sget_avatar_service
,for_user
, and
configurable_services
nethods have been re-written to return an
instance of the requested avatar service, instantiated with the
correct settings manager class.Unit tests & the rest of the avatar services suite have been
re-written in light of these changes.
Ran unit tests.
Tested avatar services still work with Review Board.