mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-20 08:39:21 -04:00
Our other models inherit from `JSONModel`, rather than manually doing lookups of the JSON in the `__init__` method. This commit changes the user model to work in the same way. I had to add a new concept (`DEFAULTS`) to account for some properties not always being present in the (mocked) JSON. In reality it might be that the API does always return these values. This should be looked at in future work, to see which defaults can be safely removed. At least now they: - do not mean any changes are needed to the existing tests - are explicitly separated from the attributes that we do expect to always be in the JSON response