Revamp avatar service registry API
Review Request #8479 — Created Oct. 20, 2016 and submitted — Latest diff uploaded
AvatarServices now require anAvatarSettingsManagerclass when
being instantiated. Previously, this was an optional argument that
defaulted to the defaultAvatarSettingsManagerwhich throws
NotImplementedErrorfor 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 theAvatarServiceclass as an
argument instead of itsavatar_service_idattribute. It also has the
benefit of making unit tests more succinct.The
AvatarServicesRegistry'sget_avatar_service,for_user, and
configurable_servicesnethods 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.